Raymond Hettinger
10d7603825
Leave heapreplace() unchanged.
2008-03-14 05:03:44 +00:00
Raymond Hettinger
53bdf09343
Issue 2274: Add heapq.heappushpop().
2008-03-13 19:03:51 +00:00
Thomas Wouters
13870b18f2
Also make _heapq.nlargest() use Py_ssize_t instead of ints, to iter over
...
lists and call Py_ssize_t-using helpers. All other code in this module was
already adapted to Py_ssize_t.
2006-02-16 19:21:53 +00:00
Thomas Wouters
ed6254acf2
Use 'n' format for Py_ssize_t variables to PyArg_ParseTuple(). Py_ssize_t
...
has been applied fairly arbitrarily in this module (nsmallest uses
Py_ssize_t, nlargest does not) and it probably deserves a more complete
review. Fixes heapq.nsmallest() always returning the empty list (on
platforms with 64-bit ssize_t/long)
2006-02-16 17:32:54 +00:00
Martin v. Löwis
ad0a4629be
Use Py_ssize_t for counts and sizes.
2006-02-16 14:30:23 +00:00
Neal Norwitz
1ac754fa10
Check return result from Py_InitModule*(). This API can fail.
...
Probably should be backported.
2006-01-19 06:09:39 +00:00
Raymond Hettinger
855d9a985b
Plug a leak and beef-up test coverage.
2004-09-28 00:03:54 +00:00
Raymond Hettinger
8158e84930
Fix erroneous docstring comment.
2004-09-06 07:04:09 +00:00
Raymond Hettinger
28224f897a
Improve the documented advice on how to best use heapq.heapreplace().
2004-06-20 09:07:53 +00:00
Raymond Hettinger
aefde435ef
Reverse argument order for nsmallest() and nlargest().
...
Reads better when the iterable is a generator expression.
2004-06-15 23:53:35 +00:00
Raymond Hettinger
de72eddf69
Fixup error exits in nlargest() and nsmallest().
2004-06-13 15:36:56 +00:00
Raymond Hettinger
2e3dfaf707
Install C version of heapq.nsmallest().
2004-06-13 05:26:33 +00:00
Raymond Hettinger
c929766361
Install C version of heapq.nlargest().
...
Maxheap version of heapq.smallest() is forthcoming.
2004-06-12 22:48:46 +00:00
Hye-Shik Chang
ce97fbe772
Correct the file name of _heapq module.
2004-04-25 17:51:47 +00:00