[Python-checkins] r82376 - python/branches/py3k/Doc/glossary.rst
benjamin.peterson
python-checkins at python.org
Tue Jun 29 20:36:39 CEST 2010
Author: benjamin.peterson
Date: Tue Jun 29 20:36:39 2010
New Revision: 82376
Log:
update for nonlocal keyword
Modified:
python/branches/py3k/Doc/glossary.rst
Modified: python/branches/py3k/Doc/glossary.rst
==============================================================================
--- python/branches/py3k/Doc/glossary.rst (original)
+++ python/branches/py3k/Doc/glossary.rst Tue Jun 29 20:36:39 2010
@@ -422,12 +422,14 @@
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
More information about the Python-checkins
mailing list