Andreas Stührk <andy-pyt...@hammerhartes.de> added the comment: On Mon, Mar 21, 2011 at 10:27 PM, Santoso Wijaya <rep...@bugs.python.org> wrote: > > Santoso Wijaya <santoso.wij...@gmail.com> 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 <rep...@bugs.python.org> <http://bugs.python.org/issue11627> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com