On Sat, May 31, 2008 at 6:08 PM, Mark Hammond <[EMAIL PROTECTED]> wrote: > Antoine: >> Mark Hammond <mhammond <at> skippinet.com.au> writes: >> > In both Python 2.x and 3 (a few months old build of Py3k though), the >> > traceback isn't the same. For Python 2.0 you could write it like: >> > >> > def handle_exception(): >> > ... >> > raise sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2] >> > >> > Its not clear how that would be spelt in py3k though (and from what I >> can >> > see, sys.exc_info() itself has an uncertain future in py3k). >> >> sys.exc_info() will remain, it's just that the returned value will be >> (None, None, None) if we are not in an except block in any of the >> currently active frames in the thread. > > If I look at Guido's py3k status update of almost a year ago > (http://www.artima.com/weblogs/viewpost.jsp?thread=208549) it tells me: > > * "sys.exc_info() becomes redundant (or may disappear)". Even if it doesn't > actually dissappear, the implication is that the new way (with the traceback > being an attribute) will be preferred. > > * "The old raise syntax variants raise E, e and raise E, e, tb are gone" - > but I can't see anything which indicates what the replacement is for the 2 > cases of (a) raising with the original traceback and (b) raising the same > exception with a "new" traceback reflecting the position of the 'raise'- > I admit I didn't look *that* hard though...
See PEP 3109: http://www.python.org/dev/peps/pep-3109/ Collin _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com