2 ms·
>Are you really going to recommend growing the table by duplicating it? Setting a reasonable initial size then doubling it and copying when (if!) it needs to g
by le-mark 6y ago
>Are you really going to recommend growing the table by duplicating it?
Setting a reasonable initial size then doubling it and copying when (if!) it needs to grow is a pragmatic, reasonable approach that’s quite common!
- knome 6y agohttps://github.com/python/cpython/blob/master/Objects/dictobject.c#L1210 https://github.com/python/cpython/blob/master/Objects/dictob...