Nils Bruin, 11.01.2014 00:38: > In Objects/typeobject.c:2895 I find: > > static PyObject * > object_new(PyTypeObject *type, PyObject *args, PyObject *kwds) > { > int err = 0; > if (excess_args(args, kwds)) { > if (type->tp_new != object_new && > type->tp_init != object_init) > { > err = PyErr_WarnEx(PyExc_DeprecationWarning, > "object() takes no parameters", > 1); > } > else if (type->tp_new != object_new || > type->tp_init == object_init) > { > PyErr_SetString(PyExc_TypeError, > "object() takes no parameters"); > err = -1; > } > } > if (err < 0) > return NULL;
Ah, ok, that's newer than my Py2.7 copy then. Should have updated that ages ago... > so it would seem that the objects in sage have both tp_new and tp_init > overridden (and warnings are enabled). I'm puzzled how `object_new` can > even end up being called then. Because of this change, I guess: http://thread.gmane.org/gmane.comp.python.cython.devel/15140/focus=15145 Stefan _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel