Andre Delfino
e8a2076e14
Revert "Fix all Python Cookbook links ( #22205 )" (GH-22424)
...
This commit reverts commit ac0333e1e1 as the original links are working again and they provide extended features such as comments and alternative versions.
2020-09-27 01:47:25 +01:00
Andre Delfino
ac0333e1e1
Fix all Python Cookbook links ( #22205 )
2020-09-15 21:13:26 +01:00
Rob Day
664fe3996f
bpo-29984: Improve 'heapq' test coverage (GH-992)
2019-05-31 21:13:57 -07:00
Alexander Marshalov
e22072fb11
bpo-34149: Behavior of the min/max with key=None (GH-8328)
...
Improve consistency with the signature for sorted(), heapq.nsmallest(), heapq.nlargest(), and itertools.groupby().
2018-07-23 20:58:21 -07:00
Raymond Hettinger
1bfbe78b03
Improve clarity (and small speed-up) by using tuple unpacking ( #3289 )
2017-09-04 11:47:58 -07:00
Martin Panter
6245cb3c01
Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
...
This affects documentation, code comments, and a debugging messages.
2016-04-15 02:14:19 +00:00
Berker Peksag
1ed2e69a4a
Issue #22186 : Fix typos in Lib/.
...
Patch by Févry Thibault.
2014-10-19 18:07:05 +03:00
Raymond Hettinger
354bffaec4
Update comment to reflect using the default parameter with min() and max().
2014-06-15 14:40:18 -07:00
Raymond Hettinger
48f68d00b8
Factor common code into internal functions.
...
Clean-up names of static functions.
Use Py_RETURN_NONE macro.
Expose private functions needed to support merge().
Move C imports to the bottom of the Python file.
2014-06-14 16:43:35 -07:00
Raymond Hettinger
b321e79123
Fix typo
2014-06-14 00:03:28 -07:00
Raymond Hettinger
7df3c156fa
Fix comment
2014-06-02 01:32:23 -07:00
Raymond Hettinger
450ed10c5e
Minor clean-ups.
2014-06-01 23:40:01 -07:00
Raymond Hettinger
35db43955c
Issue #13742 : Add key and reverse parameters to heapq.merge()
2014-05-30 02:28:36 -07:00
Raymond Hettinger
ab09c1319b
Minor clean-ups for heapq.merge().
2014-05-26 17:08:27 -07:00
Raymond Hettinger
41331e8193
Minor clean-ups for heapq.
2014-05-26 00:58:56 -07:00
Raymond Hettinger
356902dd75
Small code and comment cleanups
2014-05-19 22:13:45 +01:00
Raymond Hettinger
234fb2d503
Issue 21424: Apply the nlargest() optimizations to nsmallest() as well.
2014-05-11 14:21:23 -07:00
Raymond Hettinger
277842eff1
Issue #21424 : Optimize heaqp.nlargest() to make fewer tuple comparisons.
...
Consolidates the logic for nlargest() into a single function so that
decoration tuples (elem,order) or (key, order, elem) only need to
be formed when a new element is added to the heap. Formerly, a tuple
was created for every element regardless of whether it was added to
the heap.
The change reduces the number of tuples created, the number of ordering
integers created, and total number of tuple comparisons.
2014-05-11 01:55:46 -07:00
Raymond Hettinger
6ed7c20ce5
Update comment for the comparison table to use measured results rather than predicted.
2014-04-10 01:18:01 -06:00
Raymond Hettinger
2aad6ef774
Add algorithmic notes for nsmallest() and nlargest().
2014-04-09 19:53:45 -06:00
Raymond Hettinger
8f2420c94b
Broaden the early-out test for nsmallest and nlargest
2014-03-26 02:00:54 -07:00
Raymond Hettinger
f27623215c
Issue #18962 : Optimize the single iterator case for heapq.merge()
...
Suggested by Wouter Bolsterlee.
2013-09-11 01:15:40 -05:00
Brett Cannon
cd171c8e92
Issue #18200 : Back out usage of ModuleNotFoundError (8d28d44f3a9a)
2013-07-04 17:43:24 -04:00
Brett Cannon
0a140668fa
Issue #18200 : Update the stdlib (except tests) to use
...
ModuleNotFoundError.
2013-06-13 20:57:26 -04:00
Raymond Hettinger
2e8d9a799d
Fix typo
2013-03-05 02:11:10 -05:00