[code-quality] Nested loop with same control variable: no warning?

Dan Stromberg strombrg at gmail.com
Mon May 23 11:46:06 EDT 2016


Why doesn't the following produce a pylint warning?

for counter in range(2):
    for counter in range(3):
        print(counter)

Note that we've used "counter" twice.

Thanks!

-- 
Dan Stromberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/code-quality/attachments/20160523/fc8a7caf/attachment.html>


More information about the code-quality mailing list