Guido van Rossum wrote:
> Somehow it seems that exceptions keep getting permission to violate
> the rules... (E.g. the insistence on a fixed base class is also
> considered unpythonic in other contexts.) Maybe it's because they're
> "exceptions" ? :-)
>
> Anyway, I believe there's a use case for re-raising an existing
> exception with an added traceback. After all the __traceback__
> attribute is mutable. Returning the mutated object is acceptable here
> because the *dominant* use case is creating and raising an exception
> in one go:
>
> raise FooException(<args>).with_traceback(<tb>)
Works for me.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
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