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.

Author brett.cannon
Recipients Hibou57, Roscoe R. Higgins, brett.cannon, docs@python
Date 2016-01-26.22:21:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It depends on how you want to view things as to whether you can claim there are two or three scopes for module-level code. While it's true that the local scope operates just like global scope, to Python it's more like local == global rather than the local scope simply doesn't exist (hence why `locals()` never throws an exception saying the scope doesn't exist but instead is the same as `globals()`).

The "three scope" phrasing also predates nested scopes from back when Python had its LGB scoping rules: Local-Global-Builtin. Back then we just said Python had three scopes and left it at that since it was basically always true and didn't confuse anyone.

At this point I'm fine with just removing the number from the sentence and saying something like "At any time during execution, there are various nested scopes whose namespaces are directly accessible:".
Date User Action Args
2016-01-26 22:21:50brett.cannonsetrecipients: + brett.cannon, docs@python, Hibou57, Roscoe R. Higgins
2016-01-26 22:21:50brett.cannonsetmessageid: <>
2016-01-26 22:21:50brett.cannonlinkissue26205 messages
2016-01-26 22:21:50brett.cannoncreate