Skip to content

Commit e7204f9

Browse files
author
georg.brandl
committed
nonlocal is not in 2.6.
git-svn-id: http://svn.python.org/projects/python/trunk@65172 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 2324791 commit e7204f9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Doc/tutorial/classes.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ found outside of the innermost scope are read-only (an attempt to write to such
123123
a variable will simply create a *new* local variable in the innermost scope,
124124
leaving the identically named outer variable unchanged).
125125

126-
.. XXX mention nonlocal
127-
128126
Usually, the local scope references the local names of the (textually) current
129127
function. Outside functions, the local scope references the same namespace as
130128
the global scope: the module's namespace. Class definitions place yet another
@@ -138,8 +136,8 @@ language definition is evolving towards static name resolution, at "compile"
138136
time, so don't rely on dynamic name resolution! (In fact, local variables are
139137
already determined statically.)
140138

141-
A special quirk of Python is that -- if no :keyword:`global` or
142-
:keyword:`nonlocal` statement is in effect -- assignments to names always go
139+
A special quirk of Python is that -- if no :keyword:`global`
140+
statement is in effect -- assignments to names always go
143141
into the innermost scope. Assignments do not copy data --- they just bind names
144142
to objects. The same is true for deletions: the statement ``del x`` removes the
145143
binding of ``x`` from the namespace referenced by the local scope. In fact, all

0 commit comments

Comments
 (0)