<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 31, 2018 at 7:49 AM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/31/2018 07:36 AM, Nick Coghlan wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The exception machinery deliberately attempts to avoid instantiating exception objects whenever it can, but that gets<br>
significantly more difficult if we always need to create the instance before we can decide whether or not the raised<br>
exception matches the given exception handler criteria.<br>
</blockquote>
<br>
Why is this?  Doesn't the exception have to be instantiated at some point, even if just to print to stderr?<br></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Not if it gets caught and ignored.<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>