STINNER Victor <vstin...@python.org> added the comment:

In bpo-40142, I tried to modify _PyObject_GC_TRACK() to visit the object before 
tracking it, as done by PyObject_GC_Track().

Problem: PyType_GenericAlloc() cannot traverse the object since the object 
members are not initialized yet. For example, dict_traverse() can only be 
called at dict_new() exit.

Here I propose a different approach. First, fix built-in types to only track 
instances when they are fully initialized. Avoid PyType_GenericAlloc().

----------

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

Reply via email to