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 methodsand isimmortal.

Changed in version 3.12:Py_None isimmortal.

Py_RETURN_NONE

ReturnPy_None from a function.