summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2007-02-27 15:53:28 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2007-02-27 15:53:28 (GMT)
commita4f9fc6494b15cc54999b716d8bf5048a38a1aa5 (patch)
treeb18501a5017cbef0971d15fc2f877731de67b553 /Misc
parent17e43e582c94bf57ea6a4911b891df88a235866f (diff)
downloadcpython-a4f9fc6494b15cc54999b716d8bf5048a38a1aa5.zip
cpython-a4f9fc6494b15cc54999b716d8bf5048a38a1aa5.tar.gz
cpython-a4f9fc6494b15cc54999b716d8bf5048a38a1aa5.tar.bz2
Add news about nonlocal statement
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS15
1 files changed, 15 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index edb512f..e445d3e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -62,6 +62,21 @@ Core and Builtins
- 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.