[issue44343] Adding the "with" statement support to ContextVar

2021-06-09 Thread Joongi Kim
Joongi Kim added the comment: After checking out PEP-567 (https://www.python.org/dev/peps/pep-0567/), I'm adding njs to the nosy list. -- nosy: +njs ___ Python tracker ___

[issue44343] Adding the "with" statement support to ContextVar

2021-06-07 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +aeros, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44343] Adding the "with" statement support to ContextVar

2021-06-07 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44343] Adding the "with" statement support to ContextVar

2021-06-07 Thread Joongi Kim
New submission from Joongi Kim : This is just an idea: ContextVar.set() and ContextVar.reset() looks naturally mappable with the "with" statement. For example: a = ContextVar('a') token = a.set(1234) ... a.reset(token) could be naturally rewritten as: a = ContextVar('a') with a.set(1234):