[Python-checkins] r53827 - in python/trunk: Doc/lib/libheapq.tex Lib/heapq.py
raymond.hettinger
python-checkins at python.org
Mon Feb 19 19:15:08 CET 2007
Author: raymond.hettinger
Date: Mon Feb 19 19:15:04 2007
New Revision: 53827
Modified:
python/trunk/Doc/lib/libheapq.tex
python/trunk/Lib/heapq.py
Log:
Fixup docstrings for merge().
Modified: python/trunk/Doc/lib/libheapq.tex
==============================================================================
--- python/trunk/Doc/lib/libheapq.tex (original)
+++ python/trunk/Doc/lib/libheapq.tex Mon Feb 19 19:15:04 2007
@@ -96,8 +96,8 @@
over the sorted values.
Similar to \code{sorted(itertools.chain(*iterables))} but returns an iterable,
-does not pull the data into memory all at once, and reduces the number of
-comparisons by assuming that each of the input streams is already sorted.
+does not pull the data into memory all at once, and assumes that each of the
+input streams is already sorted (smallest to largest).
\versionadded{2.6}
\end{funcdesc}
Modified: python/trunk/Lib/heapq.py
==============================================================================
--- python/trunk/Lib/heapq.py (original)
+++ python/trunk/Lib/heapq.py Mon Feb 19 19:15:04 2007
@@ -312,8 +312,8 @@
'''Merge multiple sorted inputs into a single sorted output.
Similar to sorted(itertools.chain(*iterables)) but returns an iterable,
- does not pull the data into memory all at once, and reduces the number
- of comparisons by assuming that each of the input streams is already sorted.
+ does not pull the data into memory all at once, and assumes that each of
+ the input streams is already sorted (smallest to largest).
>>> list(merge([1,3,5,7], [0,2,4,8], [5,10,15,20], [], [25]))
[0, 1, 2, 3, 4, 5, 5, 7, 8, 10, 15, 20, 25]
More information about the Python-checkins
mailing list