[Python-ideas] PEP 550 v2

Nathaniel Smith njs at pobox.com
Sat Aug 19 17:42:21 EDT 2017


On Fri, Aug 18, 2017 at 6:25 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> On 08/17/2017 02:40 AM, Nick Coghlan wrote:
>>
>> On 17 August 2017 at 04:38, Yury Selivanov wrote:
>
>
>>      ck.get_value() attempts to look up the value for that key in the
>> currently active execution context.
>>      If it doesn't find one, it then tries each of the execution
>> contexts in the currently active dynamic context.
>>      If it *still* doesn't find one, then it will set the default value
>> in the outermost execution context and then return that value.
>
>
> For what it's worth, I find the term DynamicContext much easier to
> understand with relation to these concepts.

I really like DynamicContext -- if you know the classic dynamic/static
terminology in language design then it works as a precise technical
description, but it also makes sense as plain non-technical English.
And it avoids the confusingly overloaded word "scope".

Apropos Guido's point about container naming, how about DynamicContext
and DynamicContextStack? That's only 3 letters longer than
ExecutionContext.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Python-ideas mailing list