I would just like to check if a PyObject
that I have is None
. I naively expected that any None
Pyobject *
returned from a function would be a NULL pointer, but that doesn't seem to be the case.
So: how do I check if a PyObject *
of mine points to a None
object?
I know that there are macros like PyInt_Check(PyObject *)
around, but I couldn't find anything like PyNone_Check
. I thought I could just check the equality between my PyObject
and Py_None
, but turns out I don't even know how to make equality comparisons with this library.