Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Optimize reversed(list) using a custom iterator. | Raymond Hettinger | 2003-11-07 | 1 | -2/+2 |
| | |||||
* | Implement and apply PEP 322, reverse iteration | Raymond Hettinger | 2003-11-06 | 1 | -0/+125 |
| | |||||
* | Use PyTuple_Pack() to simplify enumerate(). | Raymond Hettinger | 2003-11-02 | 1 | -5/+1 |
| | |||||
* | * Beefed-up tests | Raymond Hettinger | 2003-05-28 | 1 | -13/+42 |
| | | | | | * Allow tuple re-use * Call tp_iternext directly | ||||
* | Add a useful docstring to enumerate. | Jeremy Hylton | 2003-04-21 | 1 | -1/+6 |
| | |||||
* | Renamed PyObject_GenericGetIter to PyObject_SelfIter | Raymond Hettinger | 2003-03-17 | 1 | -1/+1 |
| | | | | | | to more accurately describe what the function does. Suggested by Thomas Wouters. | ||||
* | Created PyObject_GenericGetIter(). | Raymond Hettinger | 2003-03-17 | 1 | -8/+1 |
| | | | | Factors out the common case of returning self. | ||||
* | Remove the next() method -- one is supplied automatically by | Guido van Rossum | 2002-07-16 | 1 | -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. | ||||
* | Patch #568124: Add doc string macros. | Martin v. Löwis | 2002-06-13 | 1 | -2/+2 |
| | |||||
* | - New builtin function enumerate(x), from PEP 279. Example: | Guido van Rossum | 2002-04-26 | 1 | -0/+139 |
enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). The argument can be an arbitrary iterable object. |