[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input
Alexander Belopolsky
report at bugs.python.org
Tue Jul 20 07:08:42 CEST 2010
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
> Does Numpy correctly call PyType_Ready()?
As far as I can tell, it does:
#define DUAL_INHERIT(child, parent1, parent2) \
Py##child##ArrType_Type.tp_base = &Py##parent2##ArrType_Type; \
Py##child##ArrType_Type.tp_bases = \
Py_BuildValue("(OO)", &Py##parent2##ArrType_Type, \
&Py##parent1##_Type); \
if (PyType_Ready(&Py##child##ArrType_Type) < 0) { \
PyErr_Print(); \
PyErr_Format(PyExc_SystemError, \
"could not initialize Py%sArrType_Type", \
#child); \
return -1; \
} \
Py##child##ArrType_Type.tp_hash = Py##parent1##_Type.tp_hash;
...
DUAL_INHERIT(Int, Int, SignedInteger);
Could it be the multiple inheritance that causes the problem here?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5476>
_______________________________________
More information about the Python-bugs-list
mailing list