TheNone Object

Note that thePyTypeObject forNone is not directly exposed in thePython/C API. SinceNone is a singleton, testing for object identity (using== in C) is sufficient. There is noPyNone_Check() function for thesame reason.

PyObject*Py_None

The PythonNone object, denoting lack of value. This object has no methods.It needs to be treated just like any other object with respect to referencecounts.

Py_RETURN_NONE

Properly handle returningPy_None from within a C function (that is,increment the reference count ofNone and return it.)