[Python-ideas] Where-statement (Proposal for function expressions)
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Jul 17 04:48:31 CEST 2009
Paul Moore wrote:
> Thinking about it, the issue is that you're making where the *only*
> example in Python (that i can think of) of a non-defining construct
> which creates a new scope.
Not quite true any more, since LCs and generator
expressions now use a local scope for their
iteration variables.
However in this case, it might just be less
confusing overall to not have a new scope for
the where-block. It's not necessary in order
to get the main intended benefit.
--
Greg
More information about the Python-ideas
mailing list