blob: b6f571ba32b640df61b13b9c9ff4b2ea1177698c [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;
Guido van Rossum12d12c51993-10-26 17:58:25 +000019
Guido van Rossum93817821995-01-17 16:01:01 +000020#define PyRange_Check(op) ((op)->ob_type == &PyRange_Type)
Guido van Rossum12d12c51993-10-26 17:58:25 +000021
Mark Hammond91a681d2002-08-12 07:21:58 +000022PyAPI_FUNC(PyObject *) PyRange_New(long, long, long, int);
Martin v. Löwis3d10b342001-06-05 05:58:44 +000023
24#ifdef __cplusplus
25}
26#endif
27#endif /* !Py_RANGEOBJECT_H */