Just wrote:
>>Does the comments above make sense?
>>
>>
>
>Not quite: when raising an exception, an instance of the exception class
>_is_ created. Just like this:
>
> raise SomeException(msg)
>
>With the old (deprecated) spelling the instantiation is done implicitly:
>
> raise SomeExcepti
In article <[EMAIL PROTECTED]>,
Jacob Kroon <[EMAIL PROTECTED]> wrote:
> I'll just reply to myself what I've found out so far:
>
> > 1. PyErr_NewException() creates the exception _class_, not the
> > instance right ?
> >
> Looks like it does yes. It doesn't even seem right to talk about an
> _
I'll just reply to myself what I've found out so far:
> 1. PyErr_NewException() creates the exception _class_, not the
> instance right ?
>
Looks like it does yes. It doesn't even seem right to talk about an
_instance_ of an exception...
> 2. Is PyErr_SetString() the correct way to raise except
Hi,
I'm working on a python module written in C, and I'm trying to figure
out how to raise python
exceptions if a function fails. So far I've read
http://docs.python.org/ext/errors.html and
http://docs.python.org/api/exceptionHandling.html , but I've not fully
understood it.
I've managed to c