File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,6 @@ found outside of the innermost scope are read-only (an attempt to write to such
123123a variable will simply create a *new * local variable in the innermost scope,
124124leaving the identically named outer variable unchanged).
125125
126- .. XXX mention nonlocal
127-
128126Usually, the local scope references the local names of the (textually) current
129127function. Outside functions, the local scope references the same namespace as
130128the 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"
138136time, so don't rely on dynamic name resolution! (In fact, local variables are
139137already 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
143141into the innermost scope. Assignments do not copy data --- they just bind names
144142to objects. The same is true for deletions: the statement ``del x `` removes the
145143binding of ``x `` from the namespace referenced by the local scope. In fact, all
You can’t perform that action at this time.
0 commit comments