[Python-ideas] Tweaking closures and lexical scoping to include the function being defined
Arnaud Delobelle
arnodel at gmail.com
Tue Sep 27 23:04:26 CEST 2011
On 27 September 2011 21:38, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
[...]
> As I remember, the idea foundered because it was thought
> too confusing to have an expression that was written
> inside the function but evaluated outside of it. If
> we're seriously considering the current proposal,
> presumably we've gotten over that? Or is it still a
> valid objection?
I have been reading this thread from the start and FWIW, it's
something that I have been feeling uncomfortable about. I value the
guarantee that no code in the body of a def statement is executed when
the def statement itself is executed. This proposal would break this
guarantee.
--
Arnaud
More information about the Python-ideas
mailing list