| 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 |  | 
| Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 20 | #define PyRange_Check(op) ((op)->ob_type == &PyRange_Type) | 
| Guido van Rossum | 12d12c5 | 1993-10-26 17:58:25 +0000 | [diff] [blame] | 21 |  | 
| Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 22 | PyAPI_FUNC(PyObject *) PyRange_New(long, long, long, int); | 
| Martin v. Löwis | 3d10b34 | 2001-06-05 05:58:44 +0000 | [diff] [blame] | 23 |  | 
 | 24 | #ifdef __cplusplus | 
 | 25 | } | 
 | 26 | #endif | 
 | 27 | #endif /* !Py_RANGEOBJECT_H */ |