This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients methane, rhettinger, serhiy.storchaka, vstinner, yselivanov
Date 2017-08-11.09:24:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502443467.38.0.566045081389.issue31179@psf.upfronthosting.co.za>
In-reply-to
Content
>>>> d = dict.fromkeys(range(2000))
>>>> for i in range(1999): del d[i]
> ...
>>>> sys.getsizeof(d)
> 41020
>>>> sys.getsizeof(d.copy())
> 136

Why "del" doesn't compact the dict?
History
Date User Action Args
2017-08-11 09:24:27vstinnersetrecipients: + vstinner, rhettinger, methane, serhiy.storchaka, yselivanov
2017-08-11 09:24:27vstinnersetmessageid: <1502443467.38.0.566045081389.issue31179@psf.upfronthosting.co.za>
2017-08-11 09:24:27vstinnerlinkissue31179 messages
2017-08-11 09:24:27vstinnercreate