[Stackless] Exception passing patch

Peter Ingebretson pingebre at yahoo.com
Thu Dec 3 00:25:23 CET 2009


> Richard, you will notice that python's "raise" operator can
> take anything from 0 to three arguments.
> The first two can be:
> - class and instance of class
> - class and arguments (tuple, None, or any object)
> - instance and None
> 
> The third, if given, is an associated traceback to extend
> No arguments will raise the current exception.
> 
> How does it sound to have send_exception() emulate this
> three argument behaviour?

My suggestion would be that if such a change is made, it should only be made in the trunk line and not in the py3k line.  That is because the semantics for the raise operator have changed, so it now only supports 0-1 arguments:
 - No arguments, which re-raises the current exception
 - A class only, which raises an exception initialized with no arguments
 - An instance of a class subclassing BaseException

PEP 3109 has more details, including the rationale for the change.

Thanks,
Peter



      




More information about the Stackless mailing list