| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2004-09-01 | SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes | Raymond Hettinger | -4/+1 | |
| (Contributed by Dima Dorfman) | ||||
| 2004-08-25 | Fix docstring typo. | Raymond Hettinger | -1/+1 | |
| 2004-04-12 | * Add unittests for iterators that report their length | Raymond Hettinger | -1/+12 | |
| * Document the differences between them * Fix corner cases covered by the unittests * Use Py_RETURN_NONE where possible for dictionaries | ||||
| 2004-03-10 | Tidied up the implementations of reversed (including the custom ones | Raymond Hettinger | -16/+20 | |
| 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 | Eliminate the double reverse option. It's only use case | Raymond Hettinger | -13/+1 | |
| was academic and it was potentially confusing to use. | ||||
| 2004-02-10 | Make reversed() transparent with respect to length. | Raymond Hettinger | -1/+13 | |
| 2004-02-08 | Let reversed() work with itself. | Raymond Hettinger | -1/+12 | |
| 2004-02-07 | * Fix ref counting in extend() and extendleft(). | Raymond Hettinger | -2/+1 | |
| * Let deques support reversed(). | ||||
| 2003-11-07 | Optimize reversed(list) using a custom iterator. | Raymond Hettinger | -2/+2 | |
| 2003-11-06 | Implement and apply PEP 322, reverse iteration | Raymond Hettinger | -0/+125 | |
| 2003-11-02 | Use PyTuple_Pack() to simplify enumerate(). | Raymond Hettinger | -5/+1 | |
| 2003-05-28 | * Beefed-up tests | Raymond Hettinger | -13/+42 | |
| * Allow tuple re-use * Call tp_iternext directly | ||||
| 2003-04-21 | Add a useful docstring to enumerate. | Jeremy Hylton | -1/+6 | |
| 2003-03-17 | Renamed PyObject_GenericGetIter to PyObject_SelfIter | Raymond Hettinger | -1/+1 | |
| to more accurately describe what the function does. Suggested by Thomas Wouters. | ||||
| 2003-03-17 | Created PyObject_GenericGetIter(). | Raymond Hettinger | -8/+1 | |
| Factors out the common case of returning self. | ||||
| 2002-07-16 | Remove the next() method -- one is supplied automatically by | Guido van Rossum | -16/+11 | |
| PyType_Ready() because the tp_iternext slot is set (fortunately, because using the tp_iternext implementation for the the next() implementation is buggy). Also changed the allocation order in enum_next() so that the underlying iterator is only moved ahead when we have successfully allocated the result tuple and index. | ||||
| 2002-06-13 | Patch #568124: Add doc string macros. | Martin v. Löwis | -2/+2 | |
| 2002-04-26 | - New builtin function enumerate(x), from PEP 279. Example: | Guido van Rossum | -0/+139 | |
| enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). The argument can be an arbitrary iterable object. | ||||
