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.
7.1. Fundamental Objects¶
This section describes Python type objects and the singleton object None.
7.2. Numeric Objects¶
7.3. Sequence Objects¶
Generic operations on sequence objects were discussed in the previous chapter; this section deals with the specific kinds of sequence objects that are intrinsic to the Python language.
- 7.3.1. Byte Array Objects
- 7.3.2. String/Bytes Objects
- 7.3.3. Unicode Objects and Codecs
- 7.3.3.1. Unicode Objects
- 7.3.3.2. Built-in Codecs
- 7.3.3.2.1. Generic Codecs
- 7.3.3.2.2. UTF-8 Codecs
- 7.3.3.2.3. UTF-32 Codecs
- 7.3.3.2.4. UTF-16 Codecs
- 7.3.3.2.5. UTF-7 Codecs
- 7.3.3.2.6. Unicode-Escape Codecs
- 7.3.3.2.7. Raw-Unicode-Escape Codecs
- 7.3.3.2.8. Latin-1 Codecs
- 7.3.3.2.9. ASCII Codecs
- 7.3.3.2.10. Character Map Codecs
- 7.3.3.2.11. MBCS codecs for Windows
- 7.3.3.2.12. Methods & Slots
- 7.3.3.3. Methods and Slot Functions
- 7.3.4. Buffers and Memoryview Objects
- 7.3.5. Tuple Objects
- 7.3.6. List Objects
7.4. Mapping Objects¶
7.5. Other Objects¶
- 7.5.1. Class and Instance Objects
- 7.5.2. Function Objects
- 7.5.3. Method Objects
- 7.5.4. File Objects
- 7.5.5. Module Objects
- 7.5.6. Iterator Objects
- 7.5.7. Descriptor Objects
- 7.5.8. Slice Objects
- 7.5.9. Weak Reference Objects
- 7.5.10. Capsules
- 7.5.11. CObjects
- 7.5.12. Cell Objects
- 7.5.13. Generator Objects
- 7.5.14. DateTime Objects
- 7.5.15. Set Objects
- 7.5.16. Code Objects