[Python-Dev] Re: [Python-checkins] python/dist/src/Modules heapqmodule.c, 1.1, 1.2

Guido van Rossum guido at python.org
Sat Nov 15 10:43:55 EST 2003


> + 	if (!PyList_Check(heap)) {
> + 		PyErr_SetString(PyExc_ValueError, "heap argument must be a list");
> + 		return NULL;
> + 	}
> + 

As Tim suggested, this should be a TypeError.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list