Message198098
getsizeof() is interesting only if it gives sensible results when used correctly, especially if you want to sum these values and get a global memory usage.
One usage is to traverse objects through gc.get_referents(); in this case the definition above is correct.
Now, are you suggesting to traverse objects differently? With dir(), or __dict__?
(btw, this discussion explains why pypy still does not implement getsizeof()) |
|
Date |
User |
Action |
Args |
2013-09-19 17:47:50 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, loewis, rhettinger, pitrou, serhiy.storchaka |
2013-09-19 17:47:50 | amaury.forgeotdarc | set | messageid: <1379612870.78.0.983941461782.issue19048@psf.upfronthosting.co.za> |
2013-09-19 17:47:50 | amaury.forgeotdarc | link | issue19048 messages |
2013-09-19 17:47:50 | amaury.forgeotdarc | create | |
|