[issue29949] sizeof set after set_merge() is doubled from 3.5
INADA Naoki
report at bugs.python.org
Fri Mar 31 08:22:41 EDT 2017
INADA Naoki added the comment:
See set_update_internal().
https://github.com/python/cpython/blob/master/Objects/setobject.c#L969-L1016
This happens only when iterable is set or dict.
>>> import sys
>>> sys.getsizeof(set(range(10)))
736
>>> sys.getsizeof(set(set(range(10))))
1248
>>> sys.getsizeof(set(dict.fromkeys(range(10))))
1248
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29949>
_______________________________________
More information about the Python-bugs-list
mailing list