summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-06-29 18:40:09 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-06-29 18:40:09 (GMT)
commitf6f3f53714d08dc3dc30c66037a275361dea224e (patch)
treeef87e0e5a5c8fc804ac865bbd0d9dee7e07807d2 /Doc
parentacf16deeb859feaef2af9f48d3ef0570658c70dc (diff)
downloadcpython-f6f3f53714d08dc3dc30c66037a275361dea224e.zip
cpython-f6f3f53714d08dc3dc30c66037a275361dea224e.tar.gz
cpython-f6f3f53714d08dc3dc30c66037a275361dea224e.tar.bz2
Merged revisions 82376 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82376 | benjamin.peterson | 2010-06-29 13:36:39 -0500 (Tue, 29 Jun 2010) | 1 line update for nonlocal keyword ........
Diffstat (limited to 'Doc')
-rw-r--r--Doc/glossary.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index a69a0f8..a05db12 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -420,12 +420,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