[issue4998] __slots__ on Fraction is useless

Mark Dickinson report at bugs.python.org
Tue Jan 20 18:57:24 CET 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

> ~44 bytes per Decimal on average with __slots__
> ~183 bytes per Decimal on average without __slots__

...and of course a difference of 140 bytes shouldn't really be
much of a surprise:

Python 3.1a0 (py3k:68809M, Jan 20 2009, 16:55:13) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.getsizeof(dict())
140

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


More information about the Python-bugs-list mailing list