]> granicus.if.org Git - python/commitdiff
Merged revisions 82376 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Tue, 29 Jun 2010 18:40:09 +0000 (18:40 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 29 Jun 2010 18:40:09 +0000 (18:40 +0000)
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
........

Doc/glossary.rst

index a69a0f81fa8950a4096e740e4e06af222e9461f7..a05db12028613538ee861f52c29a6d532e11214c 100644 (file)
@@ -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