Guido van Rossum | 12d12c5 | 1993-10-26 17:58:25 +0000 | [diff] [blame] | 1 | |
| 2 | /* Range object interface */ |
| 3 | |
Martin v. Löwis | 3d10b34 | 2001-06-05 05:58:44 +0000 | [diff] [blame] | 4 | #ifndef Py_RANGEOBJECT_H |
| 5 | #define Py_RANGEOBJECT_H |
| 6 | #ifdef __cplusplus |
| 7 | extern "C" { |
| 8 | #endif |
| 9 | |
Guido van Rossum | 12d12c5 | 1993-10-26 17:58:25 +0000 | [diff] [blame] | 10 | /* |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 11 | A range object represents an integer range. This is an immutable object; |
Guido van Rossum | 12d12c5 | 1993-10-26 17:58:25 +0000 | [diff] [blame] | 12 | a range cannot change its value after creation. |
| 13 | |
| 14 | Range objects behave like the corresponding tuple objects except that |
| 15 | they are represented by a start, stop, and step datamembers. |
| 16 | */ |
| 17 | |
Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 18 | PyAPI_DATA(PyTypeObject) PyRange_Type; |
Guido van Rossum | 12d12c5 | 1993-10-26 17:58:25 +0000 | [diff] [blame] | 19 | |
Martin v. Löwis | 9f2e346 | 2007-07-21 17:22:18 +0000 | [diff] [blame^] | 20 | #define PyRange_Check(op) (Py_Type(op) == &PyRange_Type) |
Guido van Rossum | 12d12c5 | 1993-10-26 17:58:25 +0000 | [diff] [blame] | 21 | |
Martin v. Löwis | 3d10b34 | 2001-06-05 05:58:44 +0000 | [diff] [blame] | 22 | #ifdef __cplusplus |
| 23 | } |
| 24 | #endif |
| 25 | #endif /* !Py_RANGEOBJECT_H */ |