mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +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
16
Include/enumobject.h
Normal file
16
Include/enumobject.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef Py_ENUMOBJECT_H
|
||||
#define Py_ENUMOBJECT_H
|
||||
|
||||
/* Enumerate Object */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern DL_IMPORT(PyTypeObject) PyEnum_Type;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !Py_ENUMOBJECT_H */
|
Loading…
Add table
Add a link
Reference in a new issue