At 03:27 PM 2/24/2007 -0600, Collin Winter wrote: >Are "new-style" except clauses the ones spelled "except E as NAME" while >"old-style" ones are spelled "except E, NAME"?
Yes. >What happens in this case: > >e = Exception() >e.__traceback__ = T1 >raise Exception, e, T2 > >Which traceback takes precedence? My preference would be to raise an >exception in this case. Hm. How would you get that case in normal code? I guess if you had a new-style except: that then used a 3-argument raise, you could end up with that. I'm not sure if that's really a problem though. In 2.6, we'll still be using the old exception machinery, so the raise will "do the right thing", it's just that the exception instance will have a redundant __traceback__. I guess, if anything, my inclination would be to have the three-argument "raise" delete e.__traceback__. T2 will get put on it if it's caught by a new-style except: clause. _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
