"MAL" == M email@example.com writes:
MAL> I'm sure this could easily be turned into a std lib module MAL> which then covers all the Python builtins....
But I think such a function would be more useful if extension types can play along. I mean, there's fairly good lore about the memory footprint of built-in types, but it would be much harder to figure that out for some 3rd party extension type you grabbed off the net. So I think it would be much more useful in the latter case.
"SP" == Samuele Pedroni firstname.lastname@example.org writes:
SP> it is very unlikely that we can implement this in Jython,
SP> I would prefer it to be
| sys.sizeof | or sys._sizeof
This is an important point, so I'd prefer sys._sizeof().