cpython/Objects
Raymond Hettinger ef9bf4031a Tidied up the implementations of reversed (including the custom ones
for xrange and list objects).

* list.__reversed__ now checks the length of the sequence object before
  calling PyList_GET_ITEM() because the mutable could have changed length.

* all three implementations are now tranparent with respect to length and
  maintain the invariant len(it) == len(list(it)) even when the underlying
  sequence mutates.

* __builtin__.reversed() now frees the underlying sequence as soon
  as the iterator is exhausted.

* the code paths were rearranged so that the most common paths
  do not require a jump.
2004-03-10 10:10:42 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
abstract.c SF Patch #871704: Py_SequenceFast can mask errors 2004-01-11 23:26:51 +00:00
boolobject.c - bool() called without arguments now returns False rather than 2003-04-19 18:15:10 +00:00
bufferobject.c Call me anal, but there was a particular phrase that was speading to 2002-08-19 19:26:42 +00:00
cellobject.c Use new GC API. 2001-08-29 23:54:21 +00:00
classobject.c - When method objects have an attribute that can be satisfied either 2003-11-22 23:55:50 +00:00
cobject.c Make CObjects mutable. Fixes #477441. 2003-10-19 18:30:01 +00:00
complexobject.c Simplify and speedup uses of Py_BuildValue(): 2003-10-12 19:09:37 +00:00
descrobject.c Use PyDict_Contains() instead of PySequence_Contains(). 2003-12-13 11:58:56 +00:00
dictnotes.txt Add notes on use cases with paired accesses to the same key. 2003-05-28 14:10:46 +00:00
dictobject.c Factor out code common to PyDict_Copy() and PyDict_Merge(). 2004-03-08 04:19:01 +00:00
enumobject.c Tidied up the implementations of reversed (including the custom ones 2004-03-10 10:10:42 +00:00
fileobject.c Remove support for --without-universal-newlines (see PEP 11). 2004-02-07 13:53:46 +00:00
floatobject.c Oops, didn't mean to commit the removal of float_compare! 2004-02-26 13:16:03 +00:00
frameobject.c Two forgotten Py_DECREF() for two out-of-memory conditions. 2004-01-27 16:08:07 +00:00
funcobject.c SF bug #753451: classmethod abuse --> SystemError 2003-06-18 01:13:41 +00:00
intobject.c SF patch #875689: >100k alloc wasted on startup 2004-02-08 18:54:37 +00:00
iterobject.c Whitespace normalization. 2003-06-25 13:12:18 +00:00
listobject.c Tidied up the implementations of reversed (including the custom ones 2004-03-10 10:10:42 +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 SF patch 703666: Several objects don't decref tmp on failure in subtype_new 2003-06-28 20:04:25 +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 Removed two unneeded lines from PyObject_Compare(). 2004-01-27 20:17:54 +00:00
obmalloc.c Whitespace normalization. 2003-06-17 15:48:11 +00:00
rangeobject.c Tidied up the implementations of reversed (including the custom ones 2004-03-10 10:10:42 +00:00
setobject.c The copy module now handles sets directly. The __copy__ methods are no 2004-03-08 18:31:10 +00:00
sliceobject.c SF bug #800796: Difference between hash() and __hash__() 2003-09-05 14:27:30 +00:00
stringobject.c [SF #866875] Add a specialized routine for one character 2004-01-05 00:29:51 +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 Optimize inner loops for subscript, repeat, and concat. 2004-03-09 13:05:22 +00:00
typeobject.c Fixed a bug in object.__reduce_ex__ (reduce_2) when using protocol 2004-02-08 04:21:26 +00:00
unicodectype.c Fix gcc 3.3 warnings related to Py_UNICODE_WIDE. 2003-12-29 01:36:01 +00:00
unicodeobject.c Fix reallocation bug in unicode.translate(): The code was comparing 2004-02-05 17:36:00 +00:00
unicodetype_db.h Add unidata_version. Bump generator version number. 2002-11-25 09:13:37 +00:00
weakrefobject.c Allocating a new weakref object can cause existing weakref objects for 2004-02-04 23:14:14 +00:00