A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-April/099096.html below:

[Python-Dev] Scope object (Re: nonlocals() function?)

[Python-Dev] Scope object (Re: nonlocals() function?) [Python-Dev] Scope object (Re: nonlocals() function?)Antoine Pitrou solipsis at pitrou.net
Tue Apr 6 01:35:24 CEST 2010
Greg Ewing <greg.ewing <at> canterbury.ac.nz> writes:
> 
> Maybe it would be better to deprecate globals() and locals()
> and replace them with another function called something like
> scope().

It is useful to distinguish between globals (i.e., module-level variables) and
locals, so replacing them with scope() would not be better IMO.

> It would return a mapping object that looks up
> names in the current scope. It could also improve on locals()
> by being writable.

If you can prove that making locals() (or its replacement) writable doesn't
complicate the interpreter core too much, then why not. Otherwise -1 :-)

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4