[issue26205] Inconsistency concerning nested scopes

2020-07-05 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: PR updated with your change. @Terry -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26205] Inconsistency concerning nested scopes

2020-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: 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 name

[issue26205] Inconsistency concerning nested scopes

2020-07-05 Thread Vedran Čačić
Vedran Čačić added the comment: 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."? Any ChainMap presents itself as a dictionary to the outside. That doesn't mean it doesn't have a

[issue26205] Inconsistency concerning nested scopes

2020-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: At any one time, the language and interpreter sees the local scopes of enclosing functions as collectively 'nonlocal' for the purpose of accessing and rebinding. If there are bindings of a name 'x' in multiple enclosing local scopes, the binding for 'x' in

[issue26205] Inconsistency concerning nested scopes

2020-07-05 Thread Vedran Čačić
Vedran Čačić added the comment: Just to point out: it can be more than four, right? If you have a function aa within a function bb within a function cc, then bb's and cc's scope are different, even though functionally equivalent from the perspective of aa. -- nosy: +veky

[issue26205] Inconsistency concerning nested scopes

2020-07-04 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: +patch nosy: +nanjekyejoannah nosy_count: 8.0 -> 9.0 pull_requests: +20474 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21324 ___ Python tracker

[issue26205] Inconsistency concerning nested scopes

2019-04-11 Thread Cheryl Sabella
Cheryl Sabella added the comment: Assigning to @Mariatta for the sprints. -- assignee: docs@python -> Mariatta nosy: +Mariatta, cheryl.sabella versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue26205] Inconsistency concerning nested scopes

2016-03-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue26205] Inconsistency concerning nested scopes

2016-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Would 'three or more' be any clearer than 'at least three'? They mean the same, but the first seems better to me in this context. The real problem with this section are a) the use of Guido's first person 'I' and b) statements that were not changed when nested

[issue26205] Inconsistency concerning nested scopes

2016-01-26 Thread Brett Cannon
Brett Cannon added the comment: 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

[issue26205] Inconsistency concerning nested scopes

2016-01-26 Thread Brett Cannon
Changes by Brett Cannon : -- stage: -> needs patch type: behavior -> versions: +Python 2.7, Python 3.6 ___ Python tracker ___ ___ Py

[issue26205] Inconsistency concerning nested scopes

2016-01-26 Thread Yannick Duchêne
Yannick Duchêne added the comment: Better at least two, if I'm not wrong: the innermost scope may be the module's scope. So there is always at least the module scope and the built‑ins scope, at least two up to four. (if I have not overlooked something) -- nosy: +Hibou57 _

[issue26205] Inconsistency concerning nested scopes

2016-01-26 Thread Brett Cannon
Brett Cannon added the comment: https://docs.python.org/3/tutorial/classes.html for the docs that Roscoe is talking about. So the sentence is technically correct, it just takes careful reading to grasp what's being said. There are "at least three nested scopes", but there can be *up to* four

[issue26205] Inconsistency concerning nested scopes

2016-01-25 Thread Roscoe R.Higgins
New submission from Roscoe R.Higgins: In chapter 9. Classes of the Python3.5 documentation it says: "At any time during execution, there are at least three nested scopes whose namespaces are directly accessible:", followed by a list containing 4 items. Further down a middle scope is mentioned