Message300159
>>>> 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? |
|
Date |
User |
Action |
Args |
2017-08-11 09:24:27 | vstinner | set | recipients:
+ vstinner, rhettinger, methane, serhiy.storchaka, yselivanov |
2017-08-11 09:24:27 | vstinner | set | messageid: <1502443467.38.0.566045081389.issue31179@psf.upfronthosting.co.za> |
2017-08-11 09:24:27 | vstinner | link | issue31179 messages |
2017-08-11 09:24:27 | vstinner | create | |
|