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
3aee092ecb
Defend against a mutation during comparison
2015-05-11 20:00:25 -07:00
Raymond Hettinger
89543dd992
Issues #24099 , #24100 , and #24101 : Fix free-after-use bug in heapq.
2015-05-02 10:26:57 -07:00
Raymond Hettinger
93434890dc
Issue 21375: Fix possible Py_ssizet overflow in heapq.
2014-05-03 15:27:14 -07:00
Terry Jan Reedy
ce9cc49104
Issue #17047 : remove doubled words found in 2.7 to 3.4 Modules/*,
...
as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 17:41:44 -04:00
Antoine Pitrou
49e4dfeec8
Issue #17278 : Fix a crash in heapq.heappush() and heapq.heappop() when the list is being resized concurrently.
2013-03-04 20:30:01 +01:00
Raymond Hettinger
bca22096a1
Show the function signature in the docstring
2013-01-18 17:35:25 -08:00
Ezio Melotti
24b07bcba3
#11515 : fix several typos. Patch by Piotr Kasprzyk.
2011-03-15 18:55:01 +02:00
Éric Araujo
6807958dd4
Merged revisions 84472 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84472 | eric.araujo | 2010-09-04 00:03:10 +0200 (sam., 04 sept. 2010) | 2 lines
Fix invalid bytes for UTF-8
........
2010-09-03 22:06:31 +00:00
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
2010-05-09 14:46:46 +00:00
Raymond Hettinger
6fbfb481b8
Optimize previous checkin for heapq.
2008-06-11 12:39:09 +00:00
Raymond Hettinger
f0bc3cbdc0
Issue 3051: Let heapq work with either __lt__ or __le__.
2008-06-11 12:06:49 +00:00
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
...
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.
2008-06-09 04:58:54 +00:00
Raymond Hettinger
ec2fe78d47
Issue 3501: Make heapq support both __le__ and __lt__.
2008-06-06 21:47:51 +00:00
Raymond Hettinger
6d7702ecd1
Implement heapq in terms of less-than (to match list.sort()).
2008-05-31 03:24:31 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
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