[docs] [issue10994] implementation details in sys module

Antoine Pitrou report at bugs.python.org
Tue Jan 25 18:18:16 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> > 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).
> 
> It would be nice if this was a well-defined definition, but
> unfortunately it is not.

I didn't claim it was. Actually, if you read the rest of my message, I
did mention that PyPy could tweak the semantics if it made more sense.
So, of course, the more sharing and caching takes place, the less
obvious these semantics are, but even with CPython they are not obvious
anyway. It's not supposed to be an exact measurement for the common
developer, rather a hint that experts can use to tweak their data
structures and algorithms; you need to know details of your VM's
implementation to use that information.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10994>
_______________________________________


More information about the docs mailing list