[Python-Dev] Scope object (Re: nonlocals() function?)
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Apr 6 01:37:11 CEST 2010
More information about the Python-Dev mailing list
Tue Apr 6 01:37:11 CEST 2010
- Previous message: [Python-Dev] nonlocals() function?
- Next message: [Python-Dev] Scope object (Re: nonlocals() function?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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. -- Greg
- Previous message: [Python-Dev] nonlocals() function?
- Next message: [Python-Dev] Scope object (Re: nonlocals() function?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list