blob: ff6dbc2871798188e67aeb8c1dc41a5841e61f25 [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
Guido van Rossum051ab121995-02-27 10:17:52 +000018extern DL_IMPORT(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
Thomas Woutersefafcea2001-07-09 12:30:54 +000022extern DL_IMPORT(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 */