[issue15490] Correct __sizeof__ support for StringIO
Serhiy Storchaka
report at bugs.python.org
Tue Jul 31 17:52:33 CEST 2012
Serhiy Storchaka added the comment:
Do I understand correctly that for each Python subobject must be one of the following:
1) or it is visited in tp_traverse;
2) or it is accounted in __sizeof__ together with all its subobjects (if they cannot leak out)?
PyAccu can contains not only Unicode objects, but at least an instance of a Unicode subtype, which can has a reference to StringIO object, creating a cycle. Does this mean that PyAccu should be visited in tp_traverse and not be accounted in __sizeof__? Or should we tighten the control and ensure that PyAccu contains only exact Unicode objects?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15490>
_______________________________________
More information about the Python-bugs-list
mailing list