PyDict_Size() sets an exception and returns 0 if it is passed NULL or a non-dict. Is this a bug? It seems like it should return -1, otherwise you'd have to distinguish between an empty dict and an error by calling PyErr_Occurred(). Jeremy