summaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-12 19:53:07 +0000
committerRaymond Hettinger <python@rcn.com>2004-09-12 19:53:07 +0000
commita84f3abb9ed70a0b13181698fd8c270dd4abbb88 (patch)
tree7cbcb9c7c76b73e54751dc52704dd48fe5f67d09 /Python/errors.c
parent0e9980f75a203ee1b2ac28f76a76239446b271d6 (diff)
downloadcpython-git-a84f3abb9ed70a0b13181698fd8c270dd4abbb88.tar.gz
SF #1022910: Conserve memory with list.pop()
The list resizing scheme only downsized when more than 16 elements were removed in a single step: del a[100:120]. As a result, the list would never shrink when popping elements off one at a time. This patch makes it shrink whenever more than half of the space is unused. Also, at Tim's suggestion, renamed _new_size to new_allocated. This makes the code easier to understand.
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions