[issue14055] Implement __sizeof__ for etree Element

Martin v. Löwis report at bugs.python.org
Sat Jun 16 20:43:46 CEST 2012


Martin v. Löwis <martin at v.loewis.de> added the comment:

__sizeof__ is supposed to account for just the object, not for the size of any object it refers to. If you want to compute total memory consumption, you should get a list of all objects, and then sum up __sizeof__. If some object would also include some of its referents, there would be a danger of accounting some memory twice.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14055>
_______________________________________


More information about the Python-bugs-list mailing list