summaryrefslogtreecommitdiffstats
path: root/Modules/_heapqmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Optimize previous checkin for heapq.Raymond Hettinger2008-06-111-1/+7
|
* Issue 3051: Let heapq work with either __lt__ or __le__.Raymond Hettinger2008-06-111-7/+6
|
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-1/+1
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Issue 3501: Make heapq support both __le__ and __lt__.Raymond Hettinger2008-06-061-11/+28
|
* Implement heapq in terms of less-than (to match list.sort()).Raymond Hettinger2008-05-311-14/+26
|
* Renamed PyString to PyBytesChristian Heimes2008-05-261-1/+1
|
* Leave heapreplace() unchanged.Raymond Hettinger2008-03-141-5/+0
|
* Issue 2274: Add heapq.heappushpop().Raymond Hettinger2008-03-131-0/+49
|
* Also make _heapq.nlargest() use Py_ssize_t instead of ints, to iter overThomas Wouters2006-02-161-2/+2
| | | | | lists and call Py_ssize_t-using helpers. All other code in this module was already adapted to Py_ssize_t.
* Use 'n' format for Py_ssize_t variables to PyArg_ParseTuple(). Py_ssize_tThomas Wouters2006-02-161-1/+1
| | | | | | | 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)
* Use Py_ssize_t for counts and sizes.Martin v. Löwis2006-02-161-11/+13
|
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Plug a leak and beef-up test coverage.Raymond Hettinger2004-09-281-4/+12
|
* Fix erroneous docstring comment.Raymond Hettinger2004-09-061-2/+3
|
* Improve the documented advice on how to best use heapq.heapreplace().Raymond Hettinger2004-06-201-1/+2
|
* Reverse argument order for nsmallest() and nlargest().Raymond Hettinger2004-06-151-2/+2
| | | | Reads better when the iterable is a generator expression.
* Fixup error exits in nlargest() and nsmallest().Raymond Hettinger2004-06-131-8/+16
|
* Install C version of heapq.nsmallest().Raymond Hettinger2004-06-131-5/+162
|
* Install C version of heapq.nlargest().Raymond Hettinger2004-06-121-0/+76
| | | | Maxheap version of heapq.smallest() is forthcoming.
* Correct the file name of _heapq module.Hye-Shik Chang2004-04-251-0/+364