[Python-Dev] with_traceback (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 1 03:42:00 CET 2007
- Previous message: [Python-Dev] with_traceback
- Next message: [Python-Dev] with_traceback
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jean-Paul Calderone wrote:
And the new behavior? Every raise statement copies an exception instance, some code will create a new exception instance for each raise statement, some code will create a single exception and re-raise it repeatedly.
Make that "most code will create a new exception instance and then make a copy of it", unless this can be optimised away somehow, and it's not necessarily obvious that the refcount == 1 trick will work (it depends on the exact details of how the references flow through the exception raising machinery).
-- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'm not a morning person.) | greg.ewing at canterbury.ac.nz +--------------------------------------+
- Previous message: [Python-Dev] with_traceback
- Next message: [Python-Dev] with_traceback
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]