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 rhettinger
Recipients benjamin.peterson, loewis, pitrou, rhettinger, serhiy.storchaka
Date 2017-03-26.16:02:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490544163.31.0.764435638456.issue12414@psf.upfronthosting.co.za>
In-reply-to
Content
Not including the Python accessible referred-to objects is consistent with how sys.getsizeof() works elsewhere (i.e. for object instances, the size of __dict__ is not included).

    >>> import sys
    >>> class A:
            pass

    >>> a = A()
    >>> sys.getsizeof(a)
    56
    >>> sys.getsizeof(a.__dict__)
    112

The result is easily misleading but this seems to have been an early design decision about the semanatics __sizeof__.
History
Date User Action Args
2017-03-26 16:02:43rhettingersetrecipients: + rhettinger, loewis, pitrou, benjamin.peterson, serhiy.storchaka
2017-03-26 16:02:43rhettingersetmessageid: <1490544163.31.0.764435638456.issue12414@psf.upfronthosting.co.za>
2017-03-26 16:02:43rhettingerlinkissue12414 messages
2017-03-26 16:02:43rhettingercreate