[issue44332] For Loop temporary variable scope should be local to For loop

Steven D'Aprano report at bugs.python.org
Mon Jun 7 01:45:45 EDT 2021


Steven D'Aprano <steve+python at pearwood.info> added the comment:

By the way, loop variables are not considered to be "temporary" in Python. They are no more temporary than any other local variable -- they *are* local variables with exactly the same scope and lifetime as all other local variables.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44332>
_______________________________________


More information about the Python-bugs-list mailing list