> Modified Files: > heapqmodule.c > Log Message: > Verify heappop argument is a list. > > Index: heapqmodule.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Modules/heapqmodule.c,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -C2 -d -r1.1 -r1.2 > *** heapqmodule.c 8 Nov 2003 10:24:38 -0000 1.1 > --- heapqmodule.c 15 Nov 2003 12:33:01 -0000 1.2 > *************** > *** 120,123 **** > --- 120,128 ---- > int n; > > + if (!PyList_Check(heap)) { > + PyErr_SetString(PyExc_ValueError, "heap argument must be a list"); > + return NULL; > + } Now *that's* controversial: the complaint is about the type of the argument so should raise TypeError instead. Curiously, the Python version of this module raised a pretty mysterious AttributeError.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4