Convention for C functions success/failure

spam.noam at gmail.com spam.noam at gmail.com
Sat Dec 3 18:47:35 EST 2005


Hello,

What is the convention for writing C functions which don't return a
value, but can fail?

If I understand correctly,
1. PyArg_ParseTuple returns 0 on failure and 1 on success.
2. PySet_Add returns -1 on failure and 0 on success.

Am I correct? What should I do with new C functions that I write?

Thanks,
Noam




More information about the Python-list mailing list