#
7. Concrete Objects Layer

The functions in this chapter are specific to certain Python object types. Passing them an object of the wrong type is not a good idea; if you receive an object from a Python program and you are not sure that it has the right type, you must perform a type check first; for example, to check that an object is a dictionary, use `PyDict_Check()`. The chapter is structured like the ``family tree'' of Python object types.

Warning: While the functions described in this chapter carefully check the type of the objects which are passed in, many of them do not check for `NULL` being passed instead of a valid object. Allowing `NULL` to be passed in can cause memory access violations and immediate termination of the interpreter.

Subsections

- 7.1 Fundamental Objects
  - 7.1.1 Type Objects
  - 7.1.2 The None Object
- 7.2 Numeric Objects
  - 7.2.1 Plain Integer Objects
  - 7.2.2 Long Integer Objects
  - 7.2.3 Floating Point Objects
  - 7.2.4 Complex Number Objects
    - 7.2.4.1 Complex Numbers as C Structures
    - 7.2.4.2 Complex Numbers as Python Objects
- 7.3 Sequence Objects
  - 7.3.1 String Objects
  - 7.3.2 Unicode Objects
    - 7.3.2.1 Built-in Codecs
    - 7.3.2.2 Methods and Slot Functions
  - 7.3.3 Buffer Objects
  - 7.3.4 Tuple Objects
  - 7.3.5 List Objects
- 7.4 Mapping Objects
  - 7.4.1 Dictionary Objects
- 7.5 Other Objects
  - 7.5.1 File Objects
  - 7.5.2 Instance Objects
  - 7.5.3 Method Objects
  - 7.5.4 Module Objects
  - 7.5.5 Iterator Objects
  - 7.5.6 Descriptor Objects
  - 7.5.7 Slice Objects
  - 7.5.8 Weak Reference Objects
  - 7.5.9 CObjects
  - 7.5.10 Cell Objects