Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae7ef57

Browse files
committed
GvR pointed out that only enclosing function bodies are part of nested scopes.
1 parent fb1db4c commit ae7ef57

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/tut/tut.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3553,11 +3553,11 @@ \section{Python Scopes and Name Spaces \label{scopes}}
35533553
Although scopes are determined statically, they are used dynamically.
35543554
At any time during execution, there are at least three nested scopes whose
35553555
namespaces are directly accessible: the innermost scope, which is searched
3556-
first, contains the local names; the namespaces of any enclosing code
3557-
blocks (a module, function, or class definition) which are searched starting
3558-
with the nearest enclosing scope; the middle scope, searched next, contains
3559-
the current module's global names; and the outermost scope (searched last)
3560-
is the namespace containing built-in names.
3556+
first, contains the local names; the namespaces of any enclosing
3557+
functions, which are searched starting with the nearest enclosing scope;
3558+
the middle scope, searched next, contains the current module's global names;
3559+
and the outermost scope (searched last) is the namespace containing built-in
3560+
names.
35613561
35623562
If a name is declared global, then all references and assignments go
35633563
directly to the middle scope containing the module's global names.

0 commit comments

Comments
 (0)