On Fri, 2005-03-18 at 01:19, Andrew McNamara wrote:

> No, exceptions are fast at the C level - all they do is set a flag. The
> expense of exceptions is saving a restoring python frames, I think,
> which doesn't happen in this case. So the current implementation is
> ideal for C code - clear and fast.

The other advantage for raising and catching exceptions entirely in C is
that the (class) exceptions are never instantiated.  Once you cross the
C-Python barrier you have to pay for that instantiation.

-Barry

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to