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/2001-March/013454.html below:

[Python-Dev] Deprecating locals() (was Re: nested scopes and global: some corner cases)

[Python-Dev] Deprecating locals() (was Re: nested scopes and global: some corner cases) [Python-Dev] Deprecating locals() (was Re: nested scopes and global: some corner cases)Tim Peters tim.one@home.com
Sun, 11 Mar 2001 22:25:56 -0500
[Guido]
> Actually, I intend to deprecate locals().  For now, globals() are
> fine.  I also intend to deprecate vars(), at least in the form that is
> equivalent to locals().

OK by me.  Note that we agreed long ago that if nested scopes ever made it
in, we would need to supply a way to get a "namespace mapping" object so that
stuff like:

    print "The value of i is %(i)s and j %(j)s" % locals()

could be replaced by:

    print "The value of i is %(i)s and j %(j)s" % namespace_map_object()

Also agreed this need not be a dict; fine by me if it's immutable too.




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