This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: A defect in - (Python3.0)
Type: Stage:
Components: Documentation Versions: Python 3.0
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: PyTiger, georg.brandl
Priority: normal Keywords:

Created on 2008-12-05 16:31 by PyTiger, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg77036 - (view) Author: ZX (PyTiger) Date: 2008-12-05 16:31
"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.
msg77050 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-12-05 18:07
Thanks for reporting, there was already a comment in the source about
this :)

Fixed in r67594.
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48799
2008-12-05 18:07:27georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg77050
2008-12-05 16:31:13PyTigercreate