On 2007-06-11, Marius Gedminas <[EMAIL PROTECTED]> wrote: > On Jun 6, 3:18 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: >> > 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. >> >> Certainly i and j are just as generic, but they have the >> advantage over 'item' of being more terse. > > Python programmers usually prefer readability over terseness. > Finding a variable named 'i' that is not an integer index would > be surprising to me.
Terseness and readability can go together in some circumstances, though. But every case should be handled with taste and the application experience, obviously. In a situation where 'i' might be misleading I wouldn't use it. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list