STINNER Victor added the comment:
Ah yes. Some months (years?) ago, i started to add assertions to fail if
some functions are called with an exception set.
Checking if an exception is set at runtime adds a low overhead. Maybe it's
better to fail with a fatal error (like an assertion error) in de
New submission from Serhiy Storchaka:
C API functions returns a special value unambiguously signaling about a raised
exception (NULL or -1). But in some cases this is ambiguous, because the
special value is a legitimate value (e.g. -1 for PyLong_AsLong() or NULL for
PyDict_GetItem()). Needed t