Hi Stefan, > Looking at the code in Py3, ISTM that it would be sufficient to do this iff > > (t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) != 0 > > which should be rare enough. > > Obviously requires some user side testing to see if it breaks any other > code...
Thanks for looking at this. I am wondering if there is a reason why the tp_alloc can't be replaced with the PyBaseObject_Type->tp_new directly? My understanding is that initially, object's tp_new essentially just called tp_alloc as Cython does now. Later the abc feature was added with the abstract check happening in object's tp_new, while not changing previous (non-abstract class) behavior. If Cython were to use this instead of tp_alloc, it would be forward-compatible with future changes to object. Aside from your comment that it would need extensive testing, am I missing some other problems? Thanks, Simon _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel