freakin out over C++ module in python

Serge Orlov Serge.Orlov at gmail.com
Thu Apr 20 01:01:20 EDT 2006


nephish at xit.net wrote:
> wow , thanks for the tips and the link.. i can at least see whats going
> on here.
> this project is beginning to look believable to me.
>
> i have another question.. later , in this same class, after it goes
> thru some error handling, it returns like this
> return COM_SUCCESS;
> but i cannot find where COM_SUCCESS is defined.
> can something in C++ just represent itself?

Unlikely. This is just C-style error handling. If function returns 0 it
means there were no error and if it return non-zero it means error. You
can do the same in python, but I would recommend using exceptions. If
there is an error you raise an exception, if there is no error, you
don't do anything.




More information about the Python-list mailing list