[Python-Dev] Merging PEP 310 and PEP 340-redux?

Guido van Rossum gvanrossum at gmail.com
Wed May 11 19:42:27 CEST 2005


[Phillip J. Eby]
> FYI, there are still use cases for clearing the exception state in an
> __exit__ method, that might justify allowing a true return from __exit__ to
> suppress the error.  e.g.:
[...]

Yes, but aren't those written clearer using an explicit try/except?
IMO anything that actually stops an exception from propagating outward
is worth an explicit try/except clause, so the reader knows what is
happening.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list