diff options
author | Raymond Hettinger <python@rcn.com> | 2002-08-07 20:20:52 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-08-07 20:20:52 (GMT) |
commit | ae7ef57cba593d6c7eee8d1fd887c98a135770b3 (patch) | |
tree | 2ffe5792a3055410d4991429e19af1622d4f2e55 | |
parent | fb1db4cda1a23b0a344607f7a771a03b0555a4b0 (diff) | |
download | cpython-ae7ef57cba593d6c7eee8d1fd887c98a135770b3.zip cpython-ae7ef57cba593d6c7eee8d1fd887c98a135770b3.tar.gz cpython-ae7ef57cba593d6c7eee8d1fd887c98a135770b3.tar.bz2 |
GvR pointed out that only enclosing function bodies are part of nested scopes.
-rw-r--r-- | Doc/tut/tut.tex | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index b7a9090..6f7d22e 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -3553,11 +3553,11 @@ the namespace. Although scopes are determined statically, they are used dynamically. At any time during execution, there are at least three nested scopes whose namespaces are directly accessible: the innermost scope, which is searched -first, contains the local names; the namespaces of any enclosing code -blocks (a module, function, or class definition) which are searched starting -with the nearest enclosing scope; the middle scope, searched next, contains -the current module's global names; and the outermost scope (searched last) -is the namespace containing built-in names. +first, contains the local names; the namespaces of any enclosing +functions, which are searched starting with the nearest enclosing scope; +the middle scope, searched next, contains the current module's global names; +and the outermost scope (searched last) is the namespace containing built-in +names. If a name is declared global, then all references and assignments go directly to the middle scope containing the module's global names. |