[docs] [issue10994] implementation details in sys module
Antoine Pitrou
report at bugs.python.org
Mon Jan 24 15:13:32 CET 2011
Antoine Pitrou <pitrou at 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 at bugs.python.org>
<http://bugs.python.org/issue10994>
_______________________________________
More information about the docs
mailing list