Coding Patterns for Python Extensions¶
- 1. Introduction
- 2. A Simple Example
- 3. PyObjects and Reference Counting
- 4. Containers and Reference Counts
- 5. Struct Sequence (a
namedtuplein C) - 6. Exception Raising
- 7. A Pythonic Coding Pattern for C Functions
- 8. Parsing Python Arguments
- 9. Creating New Types
- 10. Setting and Getting Module Globals
- 11. Logging and Frames
- 12. File Paths and Files
- 13. Subclassing and Using
super() - 14. Capsules
- 15. Iterators and Generators
- 16. Context Managers
- 17. Pickling C Extension Types
- 18. Watchers [Python 3.12+]
- 19. Setting Compiler Flags
- 20. Debugging
- 21. Memory Leaks
- 22. Thread Safety
- 23. Source Code Layout
- 24. Using C++ With CPython Code
- 25. Miscellaneous
- 26. Installation
- 27. Further Reading
- 28. TODO
- 29. History