[issue38938] Iterable merge performance and inclusion in itertools

2019-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Several thoughts: * heapq.merge() could have plausibly been in the itertools module instead of the heapq module. However, since it already has a home, there is no reason to move it or to create duplication with an intermodule dependency. We certainly d

[issue38938] Iterable merge performance and inclusion in itertools

2019-11-30 Thread Dennis Sweeney
Dennis Sweeney added the comment: Disregard merge_recipe.py: it would skip over a value that had already been retrieved from the iterator when the loop finished. -- ___ Python tracker __

[issue38938] Iterable merge performance and inclusion in itertools

2019-11-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___

[issue38938] Iterable merge performance and inclusion in itertools

2019-11-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: The following seems like it is a short, readable recipe for itertools. -- Added file: https://bugs.python.org/file48748/merge_recipe.py ___ Python tracker __

[issue38938] Iterable merge performance and inclusion in itertools

2019-11-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue38938] Iterable merge performance and inclusion in itertools

2019-11-28 Thread Dennis Sweeney
New submission from Dennis Sweeney : Although the implementation of the heapq.merge function uses an underlying heap structure, its behavior centers on iterators. For this reason, I believe there should either be an alias to this function in the itertools module or at least a recipe in the it