[Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming) (original) (raw)
Ethan Furman ethan at stoneleaf.us
Thu Aug 24 12:00:49 EDT 2017
- Previous message (by thread): [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)
- Next message (by thread): [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 08/24/2017 06:52 AM, Barry Warsaw wrote:
To me, the functionality proposed in PEP 550 feels more like a "scope" than a "context". Unlike a lexical scope, it can't be inferred from the layout of the source code. It's more of a dynamic "execution scope" and the stacking of "local execution scopes" reinforces that for me. You use a key to find a value in the current execution scope, and it chains up until the key is found or you've reached the top of the local execution (defined as the thread start, etc.).
Scope and dynamic certainly feel like the important concepts in PEP 550, and Guido (IIRC) has already said these functions do not belong in contextlib, so context may not be a good piece of the name.
Some various ideas:
- ExecutionScope, LocalScope
- DynamicScope, ScopeLocals
- DynamicExecutionScope, DynamicLocals
- DynamicExecutionScope, ExecutionLocals
- DynamicExecutionScope, ScopeLocals
--
Ethan
- Previous message (by thread): [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)
- Next message (by thread): [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]