diff --git a/Lib/heapq.py b/Lib/heapq.py index 00b429c..3bd064a 100644 --- a/Lib/heapq.py +++ b/Lib/heapq.py @@ -357,6 +357,10 @@ def merge(*iterables): [0, 1, 2, 3, 4, 5, 5, 7, 8, 10, 15, 20, 25] ''' + if len(iterables) == 1: + yield from iterables[0] + return + _heappop, _heapreplace, _StopIteration = heappop, heapreplace, StopIteration h = []