summaryrefslogtreecommitdiffstats
path: root/Objects/enumobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Renamed PyObject_GenericGetIter to PyObject_SelfIterRaymond Hettinger2003-03-171-1/+1
| | | | | | to more accurately describe what the function does. Suggested by Thomas Wouters.
* Created PyObject_GenericGetIter().Raymond Hettinger2003-03-171-8/+1
| | | | Factors out the common case of returning self.
* Remove the next() method -- one is supplied automatically byGuido van Rossum2002-07-161-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öwis2002-06-131-2/+2
|
* - New builtin function enumerate(x), from PEP 279. Example:Guido van Rossum2002-04-261-0/+139
enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). The argument can be an arbitrary iterable object.