Type checking inside a C extension... doesn't throw exception on failure
Jon Perez
jbperez808 at yahoo.com
Wed Apr 7 05:56:18 CEST 2004
Jon Perez wrote:
> Andrew MacIntyre wrote:
>
>> First rule of using the Python C API: _always_ check the return value of
>> API functions.
>
> This only applies to API functions which return PyObject*, right?
...because it is not hard to find instances in the source code for
the modules that come with Python where, for example, PyTuple_SetItem()'s
return value is not checked for.
More information about the Python-list
mailing list