Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

The explaining comment was added in f884b749103bad0724e2e4878cd5fe49a41bd7df.

The code itself is much older. It was originally added in 
6d6c1a35e08b95a83dbe47dbd9e6474daff00354, then
weaked in c11e192d416e2970e6a06cf06d4cf788f322c6ea and strengthen in 
29687cd2112c540a8a4d31cf3b191cf10db08412.

All types except static types which are direct descendants of object inherit 
tp_new from a base class.

We need to check which static types had tp_new = NULL before they were 
converted to heap types and set it to NULL manually after type creation.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43916>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to