What is "None" in C module

James C. Ahlstrom (jim@interet.com)
7 Apr 1995 21:09:54 -0400

Its late so maybe my brain isn't working, but I am trying to test
for a "None" object in an argument list passed to a C interface
module. The code in my_module.cpp is:

PyObject * obj1, * obj2;
if (!PyArg_Parse(args, "(OO)", &obj1, &obj2))
return NULL;
if (obj2 == Py_None) // Doesn't work
if (PyObject_Compare(obj2, Py_None) // Doesn't work either

Should this work?

Jim Ahlstrom