[Python-Dev] PEP for Better Control of Nested Lexical Scopes

Almann T. Goo almann.goo at gmail.com
Wed Feb 22 08:36:33 CET 2006

> As far as I remember, Guido wasn't particularly opposed
> to the idea, but the discussion fizzled out after having
> failed to reach a consensus on an obviously right way
> to go about it.

My apologies for bringing this debated topic again to the
front-lines--that said, I think there has been good, constructive
things said again and sometimes it doesn't hurt to kick up an old
topic.  After pouring through some of the list archive threads and
reading through this thread, it seems clear to me that the community
doesn't seem all that keen on fixing issue--which was my goal to
ferret out.

For me this is one of those things where the Pythonic thing to do is
not so clear--and that mysterious, enigmatic definition of what it
means to be Pythonic can be quite individual so I definitely don't
want to waste my time arguing what that means.

The most compelling argument for not doing anything about it is that
the use cases are probably not that many--that in itself makes me less
apt to push much harder--especially since my pragmatic side agrees
with a lot of what has been said to this regard.

IMO, Having properly nested scopes in Python in a sense made having
closures a natural idiom to the language and part of its "user
interface."  By not allowing the name re-binding it almost seems like
that "user interface" has a rough edge that is almost too easy to get
cut on.  This in-elegance seems very un-Pythonic to me.

Anyhow, good discussion.


Almann T. Goo
almann.goo at gmail.com

More information about the Python-Dev mailing list