On Mar 11, 2010, at 12:58 PM, Lisandro Dalcin wrote:

> On 11 March 2010 17:42, Robert Bradshaw  
> <[email protected]> wrote:
>>
>> As for the refnanny ones,
>>
>> http://hg.cython.org/cython-devel/rev/3045d63c5f14
>>
>
> Can you explain me the magics behind:
>
> try:
>    ....
> except object, e:
>   .....
>
> I cannot get it ...


In Python 2.5+, all errors that are raised are subclasses of  
BaseException, but that doesn't exist in 2.3 or 2.4, hence "object"  
which will catch anything (and still give us the e). The nested try is  
because the action of getting and storing e may cause an exception  
(though this shouldn't ever come up in practice).

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to