rangeobject.h 674 B

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