summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-06-29 18:36:39 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-06-29 18:36:39 (GMT)
commit927ccd257f69ea96e0de336bbf1d787473ece3e8 (patch)
treeb818f37642f5d8802d9dfe92354ef17c9e62be0e
parent0e13c9451e6cee6b73ef87bf2ce1087558118572 (diff)
downloadcpython-927ccd257f69ea96e0de336bbf1d787473ece3e8.zip
cpython-927ccd257f69ea96e0de336bbf1d787473ece3e8.tar.gz
cpython-927ccd257f69ea96e0de336bbf1d787473ece3e8.tar.bz2
update for nonlocal keyword
-rw-r--r--Doc/glossary.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 942f1e2..8363714 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -422,12 +422,14 @@ Glossary
modules, respectively.
nested scope
+
The ability to refer to a variable in an enclosing definition. For
instance, a function defined inside another function can refer to
- variables in the outer function. Note that nested scopes work only for
- reference and not for assignment which will always write to the innermost
- scope. In contrast, local variables both read and write in the innermost
- scope. Likewise, global variables read and write to the global namespace.
+ variables in the outer function. Note that nested scopes by default work
+ only for reference and not for assignment. Local variables both read and
+ write in the innermost scope. Likewise, global variables read and write
+ to the global namespace. The :keyword:`nonlocal` allows writing to outer
+ scopes.
new-style class
Old name for the flavor of classes now used for all class objects. In