[Python-checkins] python/dist/src/Modules _heapqmodule.c,1.4,1.5
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Tue Jun 15 19:53:37 EDT 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8872/Modules
Modified Files:
_heapqmodule.c
Log Message:
Reverse argument order for nsmallest() and nlargest().
Reads better when the iterable is a generator expression.
Index: _heapqmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_heapqmodule.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** _heapqmodule.c 13 Jun 2004 15:36:56 -0000 1.4
--- _heapqmodule.c 15 Jun 2004 23:53:35 -0000 1.5
***************
*** 223,227 ****
int i, n;
! if (!PyArg_ParseTuple(args, "Oi:nlargest", &iterable, &n))
return NULL;
--- 223,227 ----
int i, n;
! if (!PyArg_ParseTuple(args, "iO:nlargest", &n, &iterable))
return NULL;
***************
*** 382,386 ****
int i, n;
! if (!PyArg_ParseTuple(args, "Oi:nsmallest", &iterable, &n))
return NULL;
--- 382,386 ----
int i, n;
! if (!PyArg_ParseTuple(args, "iO:nsmallest", &n, &iterable))
return NULL;
More information about the Python-checkins
mailing list