On 06/04/2010 00:37, Greg Ewing wrote:
Antoine Pitrou wrote:
Steve Bonner <pythonsteve <at> gmail.com> writes:
What do we think of adding a built-in nonlocals() function that would
be similar to globals() and locals()?
These scopes don't have parallel capabilities:
Maybe it would be better to deprecate globals() and locals()
and replace them with another function called something like
scope(). It would return a mapping object that looks up
names in the current scope. It could also improve on locals()
by being writable.
Well, not a bad idea but it belongs on python-ideas and would be covered
by the language moratorium. :-)
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
READ CAREFULLY. By accepting and reading this email you agree, on behalf of
your employer, to release me from all obligations and waivers arising from any
and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap,
clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and
acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in perpetuity, without
prejudice to my ongoing rights and privileges. You further represent that you
have the authority to release me from any BOGUS AGREEMENTS on behalf of your
employer.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com