Re: [Python-Dev] PEP 550 v4

2017年8月25日 19:19:21 -0700

All in all, I like it. Nice job.
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.
Conceptually, an *execution context* (EC) is a stack of logical
contexts. There is one EC per Python thread.
A *logical context* (LC) is a mapping of context variables to their
values in that particular LC.
Still don't like the name of "logical context", but we can bike-shed on that 
later.
--
~Ethan~
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to