Author: jeremy.hylton
Date: Tue Feb 27 16:53:28 2007
New Revision: 53992

Modified:
   python/branches/p3yk/Misc/NEWS
Log:
Add news about nonlocal statement


Modified: python/branches/p3yk/Misc/NEWS
==============================================================================
--- python/branches/p3yk/Misc/NEWS      (original)
+++ python/branches/p3yk/Misc/NEWS      Tue Feb 27 16:53:28 2007
@@ -62,6 +62,21 @@
 
 - Added function annotations per PEP 3107.
 
+- Added nonlocal declaration from PEP 3104
+
+  >>> def f(x):
+  ...     def inc():
+  ...         nonlocal x
+  ...         x += 1
+  ...         return x
+  ...     return inc
+  ...
+  >>> inc = f(0)
+  >>> inc()
+  1
+  >>> inc()
+  2
+
 - Moved intern() to sys.intern().
 
 - exec is now a function.
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to