【发布时间】:2011-06-30 18:43:37
【问题描述】:
-
__slots__在 Python 中是如何实现的? - 这是否暴露在C interface中?
- 通过
PyTypeObject在 C 中定义 Python 类时如何获得__slots__行为?
【问题讨论】:
-
您不能像在 .py 文件中那样从 C 接口分配
__slots__属性吗? -
@David Heffernan:仅在非旧系统上
;)。
标签: python python-3.x python-c-api descriptor slots