March 12, 2001
3:25 a.m.
[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.