Mike Meyer <[EMAIL PROTECTED]> writes:
> It sounds to me like your counter variable actually has meaning,
It depends how the code is written. In the example such as:
for meaningless_variable in xrange(number_of_attempts):
...
the loop variable really has no meaning. Rewriting this code only to
appease pylint is exactly that, it has nothing with making the code
more readable.
> you've hidden that meaning by giving it the meaningless name "i". If
> you give it a meaningful name, then there's an obvious way to do it
> (which you listed yourself):
>
> while retries_left:
[...]
This loop contains more code and hence more opportunities for
introducing bugs. For example, if you use "continue" anywhere in the
loop, you will do one retry too much.
--
http://mail.python.org/mailman/listinfo/python-list