Serhiy Storchaka <storch...@gmail.com> added the comment: > Note that object.__sizeof__ does something slightly different, though: > it uses basicsize (which may or may not contain the sizeof() invocation > of the correct C structure), and it considers tp_itemsize (which may or > may not have a correct value).
All such cases are bugs (memory manager works with tp_basicsize and tp_itemsize, not with __sizeof__ result) and tests do not test it. In paranoidal mode we should tests both __sizeof__ and object.__sizeof__. For all classes, even for those that do not use the extra memory. I think it is really tedious. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15402> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com