[Python-Dev] closure semantics
Barry Warsaw
barry at python.org
Tue Oct 21 21:55:36 EDT 2003
More information about the Python-Dev mailing list
Tue Oct 21 21:55:36 EDT 2003
- Previous message: [Python-Dev] closure semantics
- Next message: [Python-Dev] closure semantics
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, 2003-10-21 at 20:20, Guido van Rossum wrote: > > Another idea: We could replace the function globals() with an object > > that provides __call__ for backwards compatibility, but also has a > > special __setattr__. Then global assignment would be 'globals.x = 23'. > > Would this be possible? > > Yes, I just proposed this in my previous response. :-) So maybe the idea of using function attributes isn't totally nuts, if you use a special name. E.g. outer.__locals__.x and outer.__globals__.x -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/python-dev/attachments/20031021/6088ac50/attachment.bin
- Previous message: [Python-Dev] closure semantics
- Next message: [Python-Dev] closure semantics
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list