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

The problem is that we suddenly changed rules. It was not required that the 
object's type should be visited in tp_visit. It was incorrect to visit it, 
because object did not have strong reference to its type. User never created 
it, and it was not created implicitly.

Now we changed rules. A strong reference is created implicitly. Who is 
responsible to manage a strong reference? Whose who created it, ant it is the 
interpreter, not the user. User does not know anything about it. If we pass the 
responsibility for the strong reference to the type on the user, we makes all 
user code incorrect, and we add a burden of fixing it and maintaining 
compatibility with incompatible Python versions on the user. I think it is very 
bad.

----------

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

Reply via email to