Open
Description
Some API functions (like PyArg_ParseTuple
) return 0 for success and non-zero for failure. It is mentioned in the docs that this is possible:
In general, when a function encounters an error, it sets an exception, discards any object references that it owns, and returns an error indicator. If not documented otherwise, this indicator is either NULL or -1, depending on the function’s return type. A few functions return a Boolean true/false result, with false indicating an error.
Nevertheless, it would be better if all the success/failure cases followed the 0/-1 convention.