[Python-ideas] PEP draft: context variables
Oleg Broytman
phd at phdru.name
Mon Sep 4 18:20:36 EDT 2017
Hi!
On Tue, Sep 05, 2017 at 12:50:35AM +0300, Koos Zevenhoven <k7hoven at gmail.com> wrote:
> cvar = contextvars.Var(default="the default value",
> description="example context variable")
Why ``description`` and not ``doc``?
> with cvar.assign(new_value):
Why ``assign`` and not ``set``?
> Each thread of the Python interpreter keeps its on stack of
"its own", I think.
> ``contextvars.Assignment`` objects, each having a pointer to the previous
> (outer) assignment like in a linked list.
Oleg.
--
Oleg Broytman http://phdru.name/ phd at phdru.name
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-ideas
mailing list