[issue3122] sys.getsizeof() gives an AttributeError for _sre objects.
report at bugs.python.org
Fri Jun 27 09:12:15 CEST 2008
Robert Schuppenies <okkotonushi at googlemail.com> added the comment:
You are right, the rule is to not include referenced objects.
But, and this has been rather informal up to now, I handled transparently
cached information as something that is added to the memory used by an
object (see unicode.defenc). The same I applied to
MatchObject.regs. The rational being that the user cannot know wether
the match positions are cached or not.
What do you think?
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list