Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys.getsizeof reaturn misleading result #1

Open
intellimath opened this issue Feb 13, 2019 · 0 comments
Open

sys.getsizeof reaturn misleading result #1

intellimath opened this issue Feb 13, 2019 · 0 comments

Comments

@intellimath
Copy link

intellimath commented Feb 13, 2019

sys.getsizeof for dataclass-based instance return the size of the basic instance structure: PyGC_Head + reference to the type of the instance + refcount + refernce to __dict__ + refrence to __weakref__ = 24+8+8+8+8=56. It don't count the space for attribute's values from __dict__ and the space for __dict__ instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant