/Include/rangeobject.h

http://unladen-swallow.googlecode.com/ · C++ Header · 28 lines · 11 code · 7 blank · 10 comment · 1 complexity · 8154225c2c62e79e6d726d8efbd7cc69 MD5 · raw file

  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 */