Python logo

上個主題

記憶體管理

下個主題

在堆上分配对象

此頁面

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.10.18 Documentation »
  • Python/C API 參考手冊 »
  • 对象实现支持
  • |
  • |

对象实现支持¶

本章描述了定义新对象类型时所使用的函数、类型和宏。

  • 在堆上分配对象
  • 通用物件結構
    • 基本的对象类型和宏
    • 实现函数和方法
    • 访问扩展类型的属性
  • 类型对象
    • 快速参考
      • "tp 槽位"
      • 子槽位
      • 槽位 typedef
    • PyTypeObject 定义
    • PyObject 槽位
    • PyVarObject 槽位
    • PyTypeObject 槽
    • 静态类型
    • 堆类型
  • 数字对象结构体
  • 映射对象结构体
  • 序列对象结构体
  • 缓冲区对象结构体
  • 异步对象结构体
  • 槽位类型 typedef
  • 範例
  • 使对象类型支持循环垃圾回收
    • 控制垃圾回收器状态

上個主題

記憶體管理

下個主題

在堆上分配对象

此頁面

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.10.18 Documentation »
  • Python/C API 參考手冊 »
  • 对象实现支持
  • |
  • |
© 版權 2001-2025, Python Software Foundation.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

The Python Software Foundation is a non-profit corporation. Please donate.

最後更新於 7月 08, 2025。 Found a bug?
Created using Sphinx 3.4.3.