New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

It would be useful to have a function in itertools to merge sorted iterables.

    merge_sorted(*iterables, key=None, reverse=False):

It should emit the same items as sorted(tee(*iterables), key=key, 
reverse=reverse) if iterables are sorted with key and reverse. But it should 
use the amount of memory O(M) where M is the number of iterables, and support 
infinite iterables.

----------
components: Library (Lib)
messages: 366056
nosy: rhettinger, serhiy.storchaka, tim.peters
priority: normal
severity: normal
status: open
title: Add a function for merging sorted iterables
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to