On 2008-05-12, Ben Finney <[EMAIL PROTECTED]> wrote:
> Paddy <[EMAIL PROTECTED]> writes:
>
>> I've used Fortran and C and so would tend to use either i,j,k as the
>> unused loop variable above, or, for clarity, call it something
>> descriptive like loop_count, if the loop body would be clearer.
>
> The problem with all of these names is that they also have long
> precedent as names of values that *will* be used inside the loop.

I guess people who standardize on loop_count never nest loops. :)

> Because of the precedent of those names, choosing one of those
> names doesn't make it clear to the reader that the value is
> never used; they have no indication from you of that until
> they look over the code a few times. It's implicit rather than
> explicit.

And when somebody adds a nested loop things fall apart.

-- 
Grant Edwards                   grante             Yow! BARBARA STANWYCK makes
                                  at               me nervous!!
                               visi.com            
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to