[Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Jun 24 19:40:59 EDT 2018

Steven D'Aprano wrote:
> You seem to be talking about an implementation which could change in the 
> future. I'm talking semantics of the proposed language feature.

The way I see it, it's not about implementation details,
it's about having a mental model that's easy to reason

"Comprehensions run in their own scope, like a def or
lambda" is a clear and simple mental model. It's easy to
explain and keep in your head.

The proposed semantics are much more complicated, and as
far as I can see, are only motivated by use cases that
you shouldn't really be doing in the first place.


More information about the Python-Dev mailing list