mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
- 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:
parent
17afa13a9f
commit
7dab2426ca
7 changed files with 281 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue