Coding Patterns for Python Extensions¶
This describes reliable patterns of coding Python Extensions in C. It covers the essentials of reference counts, exceptions and creating functions that are safe and efficient.
- 1. Introduction
- 2. PyObjects and Reference Counting
- 3. Exception Raising
- 4. A Pythonic Coding Pattern for C Functions
- 5. Parsing Python Arguments
- 6. Creating New Types
- 7. Setting and Getting Module Globals
- 8. Calling
super()
from C - 9. Setting Compiler Flags
- 10. Debugging
- 11. Memory Leaks
- 12. Thread Safety
- 13. Source Code Layout
- 14. Using C++ With CPython Code
- 15. Pickling C Extension Types
- 16. Miscellaneous
- 17. Further Reading