blob: 7e4dc28894b042097c22387ad31dfe80ad8917f8 [file] [log] [blame]
Guido van Rossum12d12c51993-10-26 17:58:25 +00001
2/* Range object interface */
3
Martin v. Löwis3d10b342001-06-05 05:58:44 +00004#ifndef Py_RANGEOBJECT_H
5#define Py_RANGEOBJECT_H
6#ifdef __cplusplus
7extern "C" {
8#endif
9
Guido van Rossum12d12c51993-10-26 17:58:25 +000010/*
Guido van Rossum93817821995-01-17 16:01:01 +000011A range object represents an integer range. This is an immutable object;
Guido van Rossum12d12c51993-10-26 17:58:25 +000012a range cannot change its value after creation.
13
14Range objects behave like the corresponding tuple objects except that
15they are represented by a start, stop, and step datamembers.
16*/
17
Mark Hammond91a681d2002-08-12 07:21:58 +000018PyAPI_DATA(PyTypeObject) PyRange_Type;
Christian Heimesa22e8bd2007-11-29 22:35:39 +000019PyAPI_DATA(PyTypeObject) PyRangeIter_Type;
20PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type;
Guido van Rossum12d12c51993-10-26 17:58:25 +000021
Christian Heimes90aa7642007-12-19 02:45:37 +000022#define PyRange_Check(op) (Py_TYPE(op) == &PyRange_Type)
Guido van Rossum12d12c51993-10-26 17:58:25 +000023
Martin v. Löwis3d10b342001-06-05 05:58:44 +000024#ifdef __cplusplus
25}
26#endif
27#endif /* !Py_RANGEOBJECT_H */