Author inada.naoki
Recipients inada.naoki, jgosmann, rhettinger, serhiy.storchaka
Date 2017-03-31.12:22:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490962961.77.0.936887275749.issue29949@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-03-31 12:22:41inada.naokisetrecipients: + inada.naoki, rhettinger, serhiy.storchaka, jgosmann
2017-03-31 12:22:41inada.naokisetmessageid: <1490962961.77.0.936887275749.issue29949@psf.upfronthosting.co.za>
2017-03-31 12:22:41inada.naokilinkissue29949 messages
2017-03-31 12:22:41inada.naokicreate