本手册记录了希望编写扩展模块或嵌入 Python 的 C 和 C 程序员使用的 API。它是扩展和嵌入 Python 解释器的伴侣,扩展和嵌入 Python 解释器描述了扩展编写的一般原理,但未详细记录 API 函数。
Introduction
Include Files
对象,类型和引用计数
Exceptions
Embedding Python
Debugging Builds
高层层
Reference Counting
Exception Handling
Unicode 异常对象
Recursion Control
Standard Exceptions
标准警告类别
String Exceptions
Utilities
osUtil
System Functions
Process Control
Importing Modules
数据编组支持
解析参数和构建值
字符串转换和格式化
Reflection
编解码器注册和支持Function
抽象对象层
Object Protocol
Number Protocol
Sequence Protocol
Mapping Protocol
Iterator Protocol
旧缓冲协议
具体对象层
Fundamental Objects
Numeric Objects
Sequence Objects
Mapping Objects
Other Objects
初始化,完成和线程
初始化和完成解释器
Process-wide parameters
线程状态和全局解释器锁定
Sub-interpreter support
Asynchronous Notifications
分析和跟踪
高级调试器支持
Memory Management
Overview
Memory Interface
Object allocators
pymalloc 分配器
Examples
对象实施支持
在堆上分配对象
通用对象结构
Type Objects
数字对象结构
Map 对象结构
序列对象结构
缓冲区对象结构
支持循环垃圾收集