blob: 359bcb69f5bcf6cb7a6dcb4121876962db804f1a [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
Armin Rigo89a39462004-10-28 16:32:00 +000010/* This is about the type 'xrange', not the built-in function range(), which
11 returns regular lists. */
12
Guido van Rossum12d12c51993-10-26 17:58:25 +000013/*
Guido van Rossum93817821995-01-17 16:01:01 +000014A range object represents an integer range. This is an immutable object;
Guido van Rossum12d12c51993-10-26 17:58:25 +000015a range cannot change its value after creation.
16
17Range objects behave like the corresponding tuple objects except that
18they are represented by a start, stop, and step datamembers.
19*/
20
Mark Hammond91a681d2002-08-12 07:21:58 +000021PyAPI_DATA(PyTypeObject) PyRange_Type;
Guido van Rossum12d12c51993-10-26 17:58:25 +000022
Guido van Rossum93817821995-01-17 16:01:01 +000023#define PyRange_Check(op) ((op)->ob_type == &PyRange_Type)
Guido van Rossum12d12c51993-10-26 17:58:25 +000024
Martin v. Löwis3d10b342001-06-05 05:58:44 +000025#ifdef __cplusplus
26}
27#endif
28#endif /* !Py_RANGEOBJECT_H */