At 03:29 PM 4/5/2006, Delaney, Timothy (Tim) wrote: >Anthony Baxter wrote: > > > On behalf of the Python development team and the Python > > community, I'm happy to announce the first alpha release > > of Python 2.5. > >I noticed in PEP 356 Open Issues "StopIteration should propagate from >context managers" that there's a still a question (from Jim Jewett) >about whether the fix is correct. > >We'll need to get confirmation from PJE, but I'm pretty sure this can be >removed from open issues - returning False from __exit__ will result in >the original exception being re-raised. It is correct, and for the reason you describe. __exit__ *must* return True or False unless the generator raises a new, non-StopIteration exception. All other exceptions must be swallowed in __exit__.
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