[issue23869] Initialization is being done in PyType_GenericAlloc

Eric Snow report at bugs.python.org
Wed Jun 13 12:22:49 EDT 2018


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

As to the docs, the entry for tp_alloc in Doc/c-api/typeobj.rst does not mention initialization.  The tp_new entry does say that it should call tp_alloc and then do the minimum initialization possible.  That implies (weakly) that tp_alloc should do the minimum initialization possible.  Could you point me to the place where the docs talk about tp_alloc and initialization?  That would be useful to see.

Regardless, having the tp_alloc entry explicitly say it shouldn't do any initialization does make sense.  Feel free to open a separate issue on that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23869>
_______________________________________


More information about the Python-bugs-list mailing list