Author serhiy.storchaka
Recipients erlendaasland, pablogsal, serhiy.storchaka, vstinner
Date 2021-04-26.11:48:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619437691.14.0.213009191659.issue43916@roundup.psfhosted.org>
In-reply-to
Content
From Objects/typeobject.c:

        /* The condition below could use some explanation.
           It appears that tp_new is not inherited for static types
           whose base class is 'object'; this seems to be a precaution
           so that old extension types don't suddenly become
           callable (object.__new__ wouldn't insure the invariants
           that the extension type's own factory function ensures).
           Heap types, of course, are under our control, so they do
           inherit tp_new; static extension types that specify some
           other built-in type as the default also
           inherit object.__new__. */
        if (base != &PyBaseObject_Type ||
            (type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
            if (type->tp_new == NULL)
                type->tp_new = base->tp_new;
        }
History
Date User Action Args
2021-04-26 11:48:11serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, pablogsal, erlendaasland
2021-04-26 11:48:11serhiy.storchakasetmessageid: <1619437691.14.0.213009191659.issue43916@roundup.psfhosted.org>
2021-04-26 11:48:11serhiy.storchakalinkissue43916 messages
2021-04-26 11:48:11serhiy.storchakacreate