The None Object - Python 3.10.9 documentation 编辑
Note that the PyTypeObject
for None
is not directly exposed in the Python/C API. Since None
is a singleton, testing for object identity (using ==
in C) is sufficient. There is no PyNone_Check()
function for the same reason.
- PyObject *
Py_None
The Python
None
object, denoting lack of value. This object has no methods. It needs to be treated just like any other object with respect to reference counts.
Py_RETURN_NONE
Properly handle returning
Py_None
from within a C function (that is, increment the reference count ofNone
and return it.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论