Message315941
Should we shrink the list of the length hint was way too big? For example, if the length hint was 100 but the final list of only 10. Should we shrink in that case?
I'm asking because it seems like Pablo's PR doesn't shrink the list in that case.
I wasn't sure so I checked, del shrinks the list if needed:
>>> x=list(range(1000))
>>> import sys
>>> sys.getsizeof(x)
9112
>>> del x[1:]
>>> sys.getsizeof(x)
96 |
|
Date |
User |
Action |
Args |
2018-04-30 08:46:25 | vstinner | set | recipients:
+ vstinner, rhettinger, serhiy.storchaka, pablogsal |
2018-04-30 08:46:25 | vstinner | set | messageid: <1525077985.77.0.682650639539.issue33234@psf.upfronthosting.co.za> |
2018-04-30 08:46:25 | vstinner | link | issue33234 messages |
2018-04-30 08:46:25 | vstinner | create | |
|