[Python-Dev] PEP 409 and the stdlib
ncoghlan at gmail.com
Mon May 20 15:47:42 CEST 2013
On 20 May 2013 23:38, "Ethan Furman" <ethan at stoneleaf.us> wrote:
> As a quick reminder, PEP 409 allows this:
> except AnError:
> raise SomeOtherError from None
> so that if the exception is not caught, we get the traditional single
exception traceback, instead of the new:
> During handling of the above exception, another exception occurred
> My question:
> How do we go about putting this in the stdlib? Is this one of the
occasions where we don't do it unless we're modifying a module already for
some other reason?
> For that matter, should we?
> Pros: Makes tracebacks much less confusing, especially coming from a
> Cons: Could hide bugs unrelated to what is being caught and transformed
Be pretty conservative with this one - we should only use it when we're
confident we know the original exception is almost certain to be irrelevant
Ensuring the traceback module makes it easy to display both would also be a
good preliminary step.
> Python-Dev mailing list
> Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev