[docs] [issue15436] __sizeof__ is not documented

Antoine Pitrou report at bugs.python.org
Thu Jul 26 01:05:31 CEST 2012

Antoine Pitrou <pitrou at free.fr> added the comment:

sys.getsizeof() is not for production code, it's for experimenting and getting information at the command prompt. It's quite useful when you know its limitations.

I'd argue that implementing __sizeof__ for user types doesn't make much sense (except C extension types, which are CPython-specific).

nosy: +pitrou

Python tracker <report at bugs.python.org>

More information about the docs mailing list