[Python-checkins] r65172 - python/trunk/Doc/tutorial/classes.rst

georg.brandl python-checkins at python.org
Mon Jul 21 20:26:21 CEST 2008


Author: georg.brandl
Date: Mon Jul 21 20:26:21 2008
New Revision: 65172

Log:
nonlocal is not in 2.6.


Modified:
   python/trunk/Doc/tutorial/classes.rst

Modified: python/trunk/Doc/tutorial/classes.rst
==============================================================================
--- python/trunk/Doc/tutorial/classes.rst	(original)
+++ python/trunk/Doc/tutorial/classes.rst	Mon Jul 21 20:26:21 2008
@@ -123,8 +123,6 @@
 a variable will simply create a *new* local variable in the innermost scope,
 leaving the identically named outer variable unchanged).
 
-.. XXX mention nonlocal
-
 Usually, the local scope references the local names of the (textually) current
 function.  Outside functions, the local scope references the same namespace as
 the global scope: the module's namespace. Class definitions place yet another
@@ -138,8 +136,8 @@
 time, so don't rely on dynamic name resolution!  (In fact, local variables are
 already determined statically.)
 
-A special quirk of Python is that -- if no :keyword:`global` or
-:keyword:`nonlocal` statement is in effect -- assignments to names always go
+A special quirk of Python is that -- if no :keyword:`global`
+statement is in effect -- assignments to names always go
 into the innermost scope.  Assignments do not copy data --- they just bind names
 to objects.  The same is true for deletions: the statement ``del x`` removes the
 binding of ``x`` from the namespace referenced by the local scope.  In fact, all


More information about the Python-checkins mailing list