[Python-Dev] PEP 550 v4

Yury Selivanov yselivanov.ml at gmail.com
Tue Aug 29 20:18:53 EDT 2017


On Tue, Aug 29, 2017 at 7:36 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
[..]
>> For (1) we want the context change to be isolated.  For (2) you say
>> that the context change should propagate to the caller.
>
>
> No, I'm saying that the context change should *always*
> propagate to the caller, unless you do something explicit
> within the generator to prevent it.
>
> I have some ideas on what that something might be, which
> I'll post later.

BTW we already have mechanisms to always propagate context to the
caller -- just use threading.local() or a global variable.  PEP 550 is
for situations when you explicitly don't want to propagate the state.

Anyways, I'm curious to hear your ideas.

Yury


More information about the Python-Dev mailing list