[Python-ideas] Let try-except check the exception instance
alexander.belopolsky at gmail.com
Thu May 31 14:00:24 EDT 2018
On Thu, May 31, 2018 at 10:37 AM Nick Coghlan <ncoghlan at gmail.com> wrote:
> The exception machinery deliberately attempts to avoid instantiating
exception objects whenever it can, but that gets significantly more
difficult if we always need to create the instance before we can decide
whether or not the raised exception matches the given exception handler
Is this really true? Consider the following simple code
Is it truly necessary to instantiate E() in this case? Yet when I run it,
I see "instantiated" printed on the console.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas