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/2003-October/039248.html below:

[Python-Dev] closure semantics

[Python-Dev] closure semantics [Python-Dev] closure semanticsBarry Warsaw barry at python.org
Tue Oct 21 21:55:36 EDT 2003
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
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