rangeobject.h 629 B

123456789101112131415161718192021222324252627
  1. /* Range object interface */
  2. #ifndef Py_RANGEOBJECT_H
  3. #define Py_RANGEOBJECT_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /*
  8. A range object represents an integer range. This is an immutable object;
  9. a range cannot change its value after creation.
  10. Range objects behave like the corresponding tuple objects except that
  11. they are represented by a start, stop, and step datamembers.
  12. */
  13. PyAPI_DATA(PyTypeObject) PyRange_Type;
  14. PyAPI_DATA(PyTypeObject) PyRangeIter_Type;
  15. PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type;
  16. #define PyRange_Check(op) (Py_TYPE(op) == &PyRange_Type)
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif /* !Py_RANGEOBJECT_H */