Martin v. Löwis added the comment: > The problem is that that definition isn't helpful. > If we ever change itertools.tee to use non-PyObjects internally, s > 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).
I see no problem with that. If the internal representation changes, nobody should be surprised if sizeof changes. > I would hope it gives remotely useful information about the passed object. It certainly does: it reports the memory consumption of the object itself, not counting the memory of other objects. I proposed a precise definition of what "an other object" is. If you don't like it, please propose a different definition that still allows to automatically sum up the memory of a graph of objects. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19048> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com