cpython/Objects
Raymond Hettinger a84f3abb9e 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.
2004-09-12 19:53:07 +00:00
..
.cvsignore
abstract.c Check the type of values returned by __int__, __float__, __long__, 2004-07-19 16:29:17 +00:00
boolobject.c - bool() called without arguments now returns False rather than 2003-04-19 18:15:10 +00:00
bufferobject.c Correct code to advance ptr to be well-formed C. 2004-03-25 16:16:28 +00:00
cellobject.c
classobject.c Repair the same thinko in two places about handling of _Py_RefTotal in 2004-08-03 10:21:03 +00:00
cobject.c Make CObjects mutable. Fixes #477441. 2003-10-19 18:30:01 +00:00
complexobject.c Fix repr for negative imaginary part. Fixes #1013908. 2004-08-22 21:09:15 +00:00
descrobject.c Use PyDict_Contains() instead of PySequence_Contains(). 2003-12-13 11:58:56 +00:00
dictnotes.txt Fix typos and add some elaborations 2004-03-15 15:52:22 +00:00
dictobject.c Moved SunPro warning suppression into pyport.h and out of individual 2004-07-15 15:54:05 +00:00
enumobject.c SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes 2004-09-01 07:02:44 +00:00
fileobject.c dump HAVE_FOPENRF stuff - obsolete 2004-06-11 04:49:03 +00:00
floatobject.c Fix a couple of signed/unsigned comparison warnings 2004-07-08 01:55:58 +00:00
frameobject.c SF Bug #215126: Over restricted type checking on eval() function 2004-07-02 06:41:07 +00:00
funcobject.c This is my patch 2004-08-12 18:12:44 +00:00
genobject.c SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes 2004-09-01 07:02:44 +00:00
intobject.c Stop producing or using OverflowWarning. PEP 237 thought this would 2004-08-25 02:14:08 +00:00
iterobject.c SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes 2004-09-01 07:02:44 +00:00
listobject.c SF #1022910: Conserve memory with list.pop() 2004-09-12 19:53:07 +00:00
listsort.txt Fixed new typos, added a little info about ~sort versus "hint"s. 2002-08-10 07:04:01 +00:00
longobject.c long_pow(): Fix more instances of leaks in error cases. 2004-08-30 02:58:59 +00:00
methodobject.c * Added a new method flag, METH_COEXIST. 2003-12-13 11:26:12 +00:00
moduleobject.c Remove code that tried to warn about shadowing builtin names after a 2003-07-16 22:04:11 +00:00
object.c SF bug #1004669: Type returned from .keys() is not checked 2004-08-07 04:55:30 +00:00
obmalloc.c whoops, I wanted that commented out by default, will add doc to Misc 2004-06-06 19:21:34 +00:00
rangeobject.c Bug 1003935: xrange overflows 2004-08-08 07:17:39 +00:00
setobject.c Moved SunPro warning suppression into pyport.h and out of individual 2004-07-15 15:54:05 +00:00
sliceobject.c SF bug #800796: Difference between hash() and __hash__() 2003-09-05 14:27:30 +00:00
stringobject.c SF Patch #1007087: Return new string for single subclass joins (Bug #1001011) 2004-08-23 23:23:54 +00:00
structseq.c Removed all uses of the out-of-favor __safe_for_unpickling__ magic 2003-02-01 02:16:37 +00:00
tupleobject.c Add a final permutation step to the tuple hash function. 2004-06-10 18:42:15 +00:00
typeobject.c Patch #980082: Missing INCREF in PyType_Ready. 2004-08-18 13:16:54 +00:00
unicodectype.c SF #989185: Drop unicode.iswide() and unicode.width() and add 2004-08-04 07:38:35 +00:00
unicodeobject.c SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now support 2004-09-07 20:24:22 +00:00
unicodetype_db.h SF #989185: Drop unicode.iswide() and unicode.width() and add 2004-08-04 07:38:35 +00:00
weakrefobject.c Be more careful about maintaining the invariants; it was actually 2004-08-03 14:47:25 +00:00