On Wed, Sep 6, 2017 at 12:07 AM, Greg Ewing <greg.ewing at 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4