This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients amaury.forgeotdarc, loewis, pitrou, rhettinger, serhiy.storchaka
Date 2013-09-20.06:04:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Antoine: in (my experience of) memory analysis, the size of a single object is mostly irrelevant. If you need to know how much memory something consumes, you typically want to know the memory of a set of objects. So this is the case that really must be supported.

For that, users will have to use libraries that know how to count memory. It's not asked to much that the authors of such libraries know about internals of Python (such as the existence of sys.getsizeof, or gc.get_referents). The question is: can such a library reasonably implemented? For that, it is important that getsizeof behaves uniformly across objects.

If you really don't like the proposed uniformity, please propose a different rule. However, don't give deviations in other places (OrderedDict) as a reason to break the rule here as well. Instead, if OrderedDict.__getsizeof__ is broken, it needs to be fixed as well.
Date User Action Args
2013-09-20 06:04:27loewissetrecipients: + loewis, rhettinger, amaury.forgeotdarc, pitrou, serhiy.storchaka
2013-09-20 06:04:27loewissetmessageid: <>
2013-09-20 06:04:27loewislinkissue19048 messages
2013-09-20 06:04:26loewiscreate