bruno.42.desthuilliers at wtf.websiteburo.oops.com
Fri Jun 8 09:59:56 CEST 2007
Neil Cerutti a écrit :
> On 2007-06-06, Bruno Desthuilliers
> <bruno.42.desthuilliers at wtf.websiteburo.oops.com> wrote:
>> Neil Cerutti a écrit :
>>> On 2007-06-04, Michael Hoffman <cam.ac.uk at mh391.invalid> wrote:
>>>> Wildemar Wildenburger wrote:
>>>> I agree with Bruno that i and j should be used only for
>>>> indices, but I'm usually less terse than that.
>>> I find i and j preferable to overly generic terms like "item."
>> Since 'i' and 'j' are canonically loop indices, I find it
>> totally confusing to use them to name the iteration variable -
>> which is not an index.
>> At least, 'item' suggests that it's an object, and a part of
>> the collection - not just an index you'll have to use to
>> subscript the container. Also, and as far as I'm concerned, I
>> certainly dont find 'i' and 'j' *less* generic than 'item' !-)
> Thanks, I didn't say clearly what I meant.
> Certainly i and j are just as generic, but they have the
> advantage over 'item' of being more terse.
I'm not sure this is really an "advantage" here.
More information about the Python-list