Fwd: [issue10994] implementation details in sys module
I think this explanation what sys.getsizeof does is interesting. We might want to have it. ---------- Forwarded message ---------- From: Antoine Pitrou <report@bugs.python.org> Date: Mon, Jan 24, 2011 at 4:13 PM Subject: [issue10994] implementation details in sys module To: fijall@gmail.com Antoine Pitrou <pitrou@free.fr> added the comment:
I suppose wrt getsizeof it's more of "if you provide us with a reasonable expectations, we can implement this" other than anything else.
The expectation is that it returns the memory footprint of the given object, and only it (not taking into account sharing, caching, dependencies or anything else). For example, an instance will not count its attribute __dict__. But a str object will count its object header plus the string payload, if the payload is private. Of course, you are free to tweak these semantics for the PyPy implementation. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10994> _______________________________________
participants (1)
-
Maciej Fijalkowski