Andreas Stührk <[email protected]> added the comment:

On Mon, Mar 21, 2011 at 10:27 PM, Santoso Wijaya <[email protected]> wrote:
>
> Santoso Wijaya <[email protected]> added the comment:
>
> Also, why is the print() in __new__ executed twice?

Because `PyErr_NormalizeException()` is called twice: First time when
the exceptions is raised, and then a second time when the exception is
caught. Because the previous call didn't instantiate an instance of a
exception, the second call will (try to) create a new exception
instance.

----------

_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11627>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to