- 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.
This commit is contained in:
Guido van Rossum 2002-04-26 19:40:56 +00:00
parent 17afa13a9f
commit 7dab2426ca
7 changed files with 281 additions and 0 deletions

View file

@ -1864,6 +1864,7 @@ _PyBuiltin_Init(void)
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);