[Python-Dev] with_traceback (original) (raw)
Michael Foord fuzzyman at voidspace.org.uk
Sat Mar 3 01:58:59 CET 2007
- Previous message: [Python-Dev] with_traceback
- Next message: [Python-Dev] with_traceback
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Greg Ewing wrote:
Michael Foord wrote:
Greg Ewing wrote:
An exception caught and raised in one thread would be vulnerable to having its traceback clobbered by another thread raising the same instance. Right - but that would still be no worse than the current situation where that information isn't available on the instance. Um -- yes, it would, because currently you don't expect the traceback to be available from the exception. If that became the standard way to handle tracebacks, then you would expect it to work reliably.
Um... except that the new attributes obviously means that the traceback information is obviously not going to work where you reuse a single instance and to expect otherwise seems naive.
If the new pattern doesn't break existing code, but means that using a single instance for optimisation (the only justification put forward - re-raising being a slightly different case) makes that information unreliable; then I don't see that as a reason to reject the change.
Michael Foord
-- Greg
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
- Previous message: [Python-Dev] with_traceback
- Next message: [Python-Dev] with_traceback
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]