- 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

@ -91,6 +91,7 @@
#include "tupleobject.h"
#include "listobject.h"
#include "dictobject.h"
#include "enumobject.h"
#include "methodobject.h"
#include "moduleobject.h"
#include "funcobject.h"

16
Include/enumobject.h Normal file
View 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 */