[Python-Dev] assert(obj) in Py_DECREF and Py_INCREF?
"Martin v. Löwis"
martin at v.loewis.de
Tue Mar 13 22:30:12 CET 2007
Georg Brandl schrieb:
> Patch #1517947 suggests adding an assert for these.
> Is that acceptable or just considered a drop in ocean?
I think it's pointless. If they ever be NULL, the INCRE/DECREF
will crash right away, anyway, so you'll certainly notice.
As you will have a debug build when the assertion triggers,
you can just as well fine the location of the crash quickly
in the debugger (e.g. using the core file on systems that
support that, or the JIT-debugger on other systems).
More information about the Python-Dev