1 /**
2   Mirror _rangeobject.h
3 
4   This is about the type 'xrange', not the built-in function range(), which
5   returns regular lists.
6 
7   A range object represents an integer range.  This is an immutable object;
8   a range cannot change its value after creation.
9 
10   Range objects behave like the corresponding tuple objects except that
11   they are represented by a start, stop, and step datamembers.
12  */
13 module deimos.python.rangeobject;
14 
15 import deimos.python.pyport;
16 import deimos.python.object;
17 
18 extern(C):
19 // Python-header-file: Include/rangeobject.h:
20 
21 /// _
22 mixin(PyAPI_DATA!"PyTypeObject PyRange_Type");
23 /// _
24 mixin(PyAPI_DATA!"PyTypeObject PyRangeIter_Type");
25 /// _
26 mixin(PyAPI_DATA!"PyTypeObject PyLongRangeIter_Type");
27 
28 // D translation of C macro:
29 /// _
30 int PyRange_Check()(PyObject *op) {
31     return Py_TYPE(op) == &PyRange_Type;
32 }
33 
34 version(Python_2_5_Or_Later){
35     // Removed in 2.5
36 }else{
37     /// Availability: 2.4
38     PyObject* PyRange_New(C_long, C_long, C_long, int);
39 }
40 
41