Python 2.2 has nested scope. Has Tutorial been updated?

Pierre Rouleau pieroul at attglobal.net
Sun Jan 6 10:53:57 EST 2002


I was scanning through Python's tutorial document while reviewing the
Python 2.2 changes.
>From what i read, Python 2.2 implements nested scopes (as described by
PEP 227 ) but it seems that the tutorial has not been updated (or am i
missing something?).

The current copy of the tuturial for Python 2.2 states, in chapter 9.2
(Python Scopes and Name Spaces):

"""Although scopes are determined statically, they are used dynamically.
At any time during execution, exactly three nested scopes are in use
(exactly three namespaces are directly accessible): the innermost scope,
which is searched first, contains the local names, 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."""

Again, am i missing something, or should the above text be corrected
inside Python 2.2 Tutorial document?

Pierre R.




More information about the Python-list mailing list