New submission from ZX <[EMAIL PROTECTED]>:

"If a name is declared global, then all references and assignments go
directly to the middle scope containing the module’s global names.
Otherwise, all variables found outside of the innermost scope are
read-only (an attempt to write to such a variable will simply create a
new local variable in the innermost scope, leaving the identically named
outer variable unchanged)." ___excerpt from <The Python
Tutorial>-<Classes>-<Python Scopes and Name Spaces>

The above description is correct in Python 2.X.
Since 3.X introduced the "nonlocal" keyword, I think the above
description is obsolete, need to be upgraded.

----------
assignee: georg.brandl
components: Documentation
messages: 77036
nosy: PyTiger, georg.brandl
severity: normal
status: open
title: A defect in <The Python Tutorial>-<Python Scopes and Name Spaces> 
(Python3.0)
versions: Python 3.0

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4549>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to