[Python-Dev] nonlocal keyword in 2.x?

Mike Krell mbk.lists at gmail.com
Thu Oct 22 03:56:51 CEST 2009

Is there any possibility of backporting support for the nonlocal keyword
into a  2.x release?  I see it's not in 2.6, but I don't know if that was an
intentional design choice or due to a lack of demand / round tuits.  I'm
also not sure if this would fall under the scope of the proposed moratorium
on new language features (although my first impression was that it could be
allowed since it already exists in python 3.

One of my motivations for asking is a recent blog post by Fernando Perez of
IPython fame that describes an interesting decorator-based idiom inspired by
Apple's Grand Central Dispatch which would allow many interesting
possibilities for expressing parallelization and other manipulations of
execution context for blocks of python code.  Unfortunately, using the
technique to its fullest extent requires the nonlocal keyword.

The blog post is here:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20091021/6c360fdb/attachment.htm>

More information about the Python-Dev mailing list