On Wed, Sep 6, 2017 at 12:07 AM, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
> Yury Selivanov wrote:
[..]
> I don't see a lot of value in trying to automagically
> isolate changes to global state *only* in generators.
>
> Under PEP 550, if you want to e.g. change the decimal
> context temporarily in a non-generator function, you're
> still going to have to protect those changes using a
> with-statement or something equivalent. I don't see
> why the same thing shouldn't apply to generators.
>
> It seems to me that it will be *more* confusing to give
> generators this magical ability to avoid with-statements.

Greg, just to make sure that we are talking about the same thing,
could you please show an example (using the current PEP 550
API/semantics) of something that in your opinion should work
differently for generators?

Yury
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
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