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 terry.reedy
Recipients Hibou57, Mariatta, Roscoe R. Higgins, brett.cannon, cheryl.sabella, docs@python, ezio.melotti, nanjekyejoannah, terry.reedy, veky
Date 2020-07-06.00:52:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Vedran: "How is that different from saying that "At any one time, the language and interpreter sees all the scopes as one scope for the purpose of accessing and rebinding."?"

For access, one may bypass the default staged access by specifying a specific namespace.  For rebinding elsewhere than in locals, one must specify one of the others.  So the 4 scopes are each visible.  However, the internal 'structure' of nonlocals is intentionally not visible or accessible.  (The proposal to make them somehow accessible was considered and rejected.)

The PR replaces 'at least three' with 'various'.  This is needlessly vague. There are always 3 namespaces and sometimes a 4th, so I think 'at least three' should be replaced with the specific '3 or 4'.

I rechecked two special cases.  Exception clauses with 'as name' bind name in the current local namespace and auto delete the binding when done.  Comprehensions bind the name and iterator of the 'for' clause in a temporary new local namespace, making the existing namespace temporarily part of a nonlocal namespace, which may or may not have been present before.  '3 or 4' still applies in both cases.
Date User Action Args
2020-07-06 00:52:41terry.reedysetrecipients: + terry.reedy, brett.cannon, ezio.melotti, docs@python, veky, Hibou57, Roscoe R. Higgins, Mariatta, cheryl.sabella, nanjekyejoannah
2020-07-06 00:52:41terry.reedysetmessageid: <>
2020-07-06 00:52:41terry.reedylinkissue26205 messages
2020-07-06 00:52:40terry.reedycreate