Josh Rosenberg <shadowranger+pyt...@gmail.com> added the comment:
The "bug" is the expected behavior for 2.7, as previously noted, and does not exist on Python 3 (where list comprehensions follow the same rules as generator expressions for scoping), where NameErrors are raised consistently. ---------- nosy: +josh.r resolution: -> not a bug versions: +Python 2.7 -Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35273> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com