aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-04-26 19:40:56 +0000
committerGuido van Rossum <guido@python.org>2002-04-26 19:40:56 +0000
commit7dab2426ca0bae36fde565407ddb4b2d2cbf2575 (patch)
tree58cab4dd199cdf49860d97d6ccd52fd58a4b9f03 /Include/enumobject.h
parent(py-comint-output-filter-function): Put the pop-to-buffer call inside (diff)
downloadcpython-7dab2426ca0bae36fde565407ddb4b2d2cbf2575.tar.gz
cpython-7dab2426ca0bae36fde565407ddb4b2d2cbf2575.tar.bz2
cpython-7dab2426ca0bae36fde565407ddb4b2d2cbf2575.zip
- 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.
Diffstat (limited to 'Include/enumobject.h')
-rw-r--r--Include/enumobject.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Include/enumobject.h b/Include/enumobject.h
new file mode 100644
index 00000000000..df20fb0b2c6
--- /dev/null
+++ b/Include/enumobject.h
@@ -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 */