"Raymond Hettinger" email@example.com writes:
I'm about to start working on this one and wanted to check here first to make sure there is still a demand for it and to get ideas on the best implementation strategy.
Unfortunately sizeof() is implemented in ctypes with different sematics, there it has the same meaning as sizeof() in C, and only works on ctypes' data types: sizeof(c_int) == 4 on 32-bit machines.
But I'm afraid a Python builtin sizeof() would win, so do I have to choose a different name?
I'm thinking of summing all of the tp_basicsize slots while recursing through tp_traverse.