[Python-Dev] Python3 compiled listcomp can't see local var - bug or feature?
skip.montanaro at gmail.com
Fri Jun 8 14:27:19 EDT 2018
> Is this a bug or a feature?
The bug was me being so excited about the new construct (I pushed in
someone else's work, can't recall who now, maybe Fredrik Lundh?) that
I didn't consider that leaking the loop variable out of the list
comprehension was a bad idea. Think of the Py3 behavior as one of
those "corrections" to things which were "got wrong" in Python 1 or 2.
More information about the Python-Dev