Py_None - macro definition in Include/object.h . This is an alias for _Py_NoneStruct in object.c , which is a static (as in the repository) global variable of type PyObject (which is a structure). It is set in terms of Python to NoneType (defined directly above it in object.c and is used only once for _Py_NoneStruct ).
So this is not NULL or any other special value in C, it is a single-screen PyObject instance of _PyNone_Type . Regarding the _PyNone_Type PyTypeObject , which are not displayed, I believe that they refer to the static (i.e. internal binding), which means that PyTypeObject is only available in object.c and is used only once to determine of PyNone .
Just add a little to this, whenever the documentation says that PyNone not of type, this should not be taken literally. It has a special type of type NoneType , which you can access through the singleton None , but you cannot create new instances or do any other actions that you can do with the regular type. There seems to be a hard-coded restriction for not creating new instances, and although I cannot pinpoint where it is defined in the CPython source, you can see its effect when trying to create a new instance:
>>> type(None) <type 'NoneType'> >>> type(None)() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: cannot create 'NoneType' instances
EDIT: It seems that the error is selected from typeobject.c when the tp_new field is NULL. Surprisingly, _PyNone_Type seems to be defined using non-NULL tp_new (points to static none_new in object.c ). At some point, it may be set to NULL, but this is just an implementation detail and does not really affect the scope of your question.
source share