Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 23285:afe263672fd8 legacy-trunk
- New builtin function enumerate(x), from PEP 279. Example:
enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c").
The argument can be an arbitrary iterable object.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 26 Apr 2002 19:40:56 +0000 |
| parents | 8291473fde3e |
| children | 6fa76b4e59fe |
line wrap: on
line diff
--- a/Python/bltinmodule.c Fri Apr 26 15:49:52 2002 +0000 +++ b/Python/bltinmodule.c Fri Apr 26 19:40:56 2002 +0000 @@ -1864,6 +1864,7 @@ SETBUILTIN("complex", &PyComplex_Type); #endif SETBUILTIN("dict", &PyDict_Type); + SETBUILTIN("enumerate", &PyEnum_Type); SETBUILTIN("float", &PyFloat_Type); SETBUILTIN("property", &PyProperty_Type); SETBUILTIN("int", &PyInt_Type);
