can some one help me with my code. thanks

Chris Angelico rosuav at gmail.com
Fri Jan 20 23:03:18 EST 2012


On Sat, Jan 21, 2012 at 1:23 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> On Fri, 20 Jan 2012 16:21:30 -0800, Rick Johnson wrote:
>> Your variable names need a bit more thought
>>
>>> def average(bin):
>>
>> What is a "bin"? Maybe you shoulc have called this a "lst" eh?
>
> "Bin" is a standard English world. You know, like "rubbish bin" or
> "recycling bin".

Or my first thought: stock location. Inventory software often doesn't
care whether your physical stock is organized by shelf, box,
warehouse, planet, or secret-space-on-Firefly-class-ship; just number
each location, and that's the bin number. (And no, that isn't like
"PIN number".) It's then quite logical to want various stats to be
per-bin, which would lead exactly to the OP's problem - including the
odd notation of input data, all too likely in a real-world scenario.

ChrisA



More information about the Python-list mailing list