A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-November/040246.html below:

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

[Python-Dev] RE: [Python-checkins] python/dist/src/Modules heapqmodule.c, 1.1, 1.2 [Python-Dev] RE: [Python-checkins] python/dist/src/Modules heapqmodule.c, 1.1, 1.2Tim Peters tim.one at comcast.net
Sat Nov 15 07:41:44 EST 2003
> 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.


More information about the Python-Dev mailing list

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