[issue19048] itertools.tee doesn't have a __sizeof__ method
Antoine Pitrou
report at bugs.python.org
Thu Sep 19 17:56:10 CEST 2013
Antoine Pitrou added the comment:
> I like the definition of __sizeof__ that was discussed some time ago:
> http://bugs.python.org/issue14520#msg157798
The problem is that that definition isn't helpful.
If we ever change itertools.tee to use non-PyObjects internally, suddenly
its sys.getsizeof() would have to return much larger numbers despite
visible behaviour not having changed at all (and despite the memory
overhead being actually lower).
And gc.get_referents() is really a low-level debugging tool, certainly
not a "reflection API" (inspect would serve that role).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19048>
_______________________________________
More information about the Python-bugs-list
mailing list