Commit Graph

50 Commits

Author SHA1 Message Date
Martin Panter
6a8163a928 Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
This affects documentation and code comments.
2016-04-15 02:14:19 +00:00
Raymond Hettinger
9a2325fac8 Fix unintended switch from a constant to a global in 56a3c0bc4634 2013-10-28 02:39:04 -06:00
Raymond Hettinger
39659f22fa Issue #19018: The heapq.merge() function no longer suppresses IndexError 2013-09-14 22:17:39 -07:00
Raymond Hettinger
3e6aafe209 Issue #16098: Update heapq.nsmallest to use the same algorithm as nlargest.
This removes the dependency on bisect and it bring the pure Python code
in-sync with the C code.
2013-03-05 02:15:01 -05:00
Raymond Hettinger
e11a47e207 Issue 13274: Make the pure python code for heapq more closely match the C implementation for an undefined corner case. 2011-10-30 14:29:06 -07:00
Éric Araujo
4800d6470c Minor tweaks to a few comments in heapq 2011-04-15 23:34:31 +02:00
Raymond Hettinger
9b342c6fd4 Issue 3051: make pure python code pass the same tests as the C version. 2011-04-13 11:15:58 -07:00
Raymond Hettinger
b006fcc30c Make life easier for non-CPython implementations. 2009-03-29 18:51:11 +00:00
Raymond Hettinger
be9b765c07 Speedup and simplify negative counter using count's new step argument. 2009-02-21 08:58:42 +00:00
Benjamin Peterson
fb921e2c00 I believe the intention here was to avoid a global lookup 2009-01-31 21:00:10 +00:00
Benjamin Peterson
b6e112bd95 fix encoding cookie case 2009-01-18 22:47:04 +00:00
Raymond Hettinger
b5bc33cdab Optimize heapq.nsmallest/nlargest for cases where n==1 or n>=size. 2009-01-12 10:37:32 +00:00
Georg Brandl
fe427895b5 Manually merge r68095,68186,68187,68188,68190 from 2.6 branch. 2009-01-03 22:03:11 +00:00
Raymond Hettinger
6d7702ecd1 Implement heapq in terms of less-than (to match list.sort()). 2008-05-31 03:24:31 +00:00
Raymond Hettinger
83aa6a3b1a Simplify the nlargest() code using heappushpop(). 2008-03-13 19:33:34 +00:00
Raymond Hettinger
53bdf09343 Issue 2274: Add heapq.heappushpop(). 2008-03-13 19:03:51 +00:00
Raymond Hettinger
3035d2397f Docstring nit. 2007-02-28 18:27:41 +00:00
Raymond Hettinger
cbac8ce5b0 Fixup docstrings for merge(). 2007-02-19 18:15:04 +00:00
Raymond Hettinger
45eb0f1419 Use C heapreplace() instead of slower _siftup() in pure python. 2007-02-19 06:59:32 +00:00
Raymond Hettinger
54da9819cc Add tie-breaker count to preserve sort stability. 2007-02-19 05:28:28 +00:00
Raymond Hettinger
00166c5532 Add merge() function to heapq. 2007-02-19 04:08:43 +00:00
Raymond Hettinger
769a40a1d0 Fix stability of heapq's nlargest() and nsmallest(). 2007-01-04 17:53:34 +00:00
Raymond Hettinger
4901a1f267 Add key= argument to heapq.nsmallest() and heapq.nlargest(). 2004-12-02 08:59:14 +00:00
Raymond Hettinger
e1defa4175 Fix argument order in pure python version of nsmallest() and nlargest(). 2004-11-29 05:54:48 +00:00
Raymond Hettinger
8158e84930 Fix erroneous docstring comment. 2004-09-06 07:04:09 +00:00