[Python-3000-checkins] r53992 - python/branches/p3yk/Misc/NEWS
jeremy.hylton
python-3000-checkins at python.org
Tue Feb 27 16:53:32 CET 2007
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.
More information about the Python-3000-checkins
mailing list