[Python-Dev] PEP 550 v4

Sven R. Kunze srkunze at mail.de
Sat Aug 26 09:33:23 EDT 2017


On 26.08.2017 04:19, Ethan Furman wrote:
> On 08/25/2017 03:32 PM, Yury Selivanov wrote:
>
>> A *context variable* is an object representing a value in the
>> execution context.  A new context variable is created by calling
>> the ``new_context_var()`` function.  A context variable object has
>> two methods:
>>
>> * ``lookup()``: returns the value of the variable in the current
>>    execution context;
>>
>> * ``set()``: sets the value of the variable in the current
>>    execution context.
>
> Why "lookup" and not "get" ?  Many APIs use "get" and it's 
> functionality is well understood.
>

Why not the same interface as thread-local storage? This has been the 
question which bothered me from the beginning of PEP550. I don't 
understand what inventing a new way of access buys us here.


Python features regular attribute access for years. It's even simpler 
than method-based access.


Best,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170826/cdbbec3c/attachment.html>


More information about the Python-Dev mailing list