I tried to recreate the problem based on what you described in your message. I was unable to recreate the problem.
I wrote the following file "sjh.c": #include <Python.h> PyObject *f(PyObject *self, PyObject *args) { PyObject *ob = NULL; if(!PyArg_ParseTuple(args, "O", &ob)) return NULL; Py_INCREF(Py_None); return Py_None; } PyMethodDef methods[] = { {"f", (PyCFunction)f, METH_VARARGS, "test function"}, {NULL} }; void initsjh() { Py_InitModule3("sjh", methods, "test module"); } I compiled it for Python 2.3: $ gcc sjh.c -I/usr/include/python2.3 -L/usr/lib/python2.3/config -lpython2.3 -shared -o sjh.so and I tested it: $ python -c 'import sjh; print sjh.f(1)' None $ python -c 'import sjh; print sjh.f({})' None $ python -c 'import sjh; print sjh.f({None: None})' None Jeff
pgpRD35L3o7hY.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list