[Stackless] Exception passing patch

Kristján Valur Jónsson kristjan at ccpgames.com
Wed Dec 2 23:10:30 CET 2009



> -----Original Message-----
> From: Richard Tew [mailto:richard.m.tew at gmail.com]
> Sent: 2. desember 2009 21:50
> To: Peter Ingebretson
> Cc: Kristján Valur Jónsson; stackless at stackless.com
> Subject: Re: [Stackless] Exception passing patch
> 
> Ah well, if raising exceptions out of generators is valid, then I can
> hardly object to the same being possible with channels.  But I do not
> think there is a reason to deprecate the old behaviour.
> 

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?

K




More information about the Stackless mailing list