Inconsistency in success/failure return values #25
Labels
evolution-proposed
theme: consistency
theme: implementation flaws
problems with the implementation of specific APIs
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.
The text was updated successfully, but these errors were encountered: