[Python-Dev] PyDict_Size() error return (original) (raw)

Jeremy Hylton jeremy at alum.mit.edu
Sun Feb 15 22:55:11 EST 2004


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



More information about the Python-Dev mailing list