[Python-Dev] Re: [Python-checkins] python/dist/src/Modules
heapqmodule.c, 1.1, 1.2
Jeremy Fincher
fincher.8 at osu.edu
Sat Nov 15 12:23:02 EST 2003
On Saturday 15 November 2003 10:43 am, Guido van Rossum wrote:
> > + if (!PyList_Check(heap)) {
> > + PyErr_SetString(PyExc_ValueError, "heap argument must be a list");
> > + return NULL;
> > + }
> > +
>
> As Tim suggested, this should be a TypeError.
If only lists are allowed, wouldn't we be better off with a better interface
than the current one? I thought the point of the current interface was that
we could use containers other than lists as long as they defined pop and
append methods.
Jeremy
More information about the Python-Dev
mailing list