[Python-Dev] When tp_clear returns non-zero?

2018年5月28日 05:20:24 -0700

The tp_clear field of PyTypeObject has type inquiry. It is a pointer to a function that takes PyObject * and return int.
typedef int (*inquiry)(PyObject *);
I'm interesting what the result of this function means. In what cases it can return non-zero, and can it set an exception? Currently tp_clear() is called in a single place, and its result is ignored. All tp_clear implementations in the stdlib always return 0.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to