Message366056
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. |
|
Date |
User |
Action |
Args |
2020-04-09 14:42:29 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, tim.peters, rhettinger |
2020-04-09 14:42:29 | serhiy.storchaka | set | messageid: <1586443349.52.0.011091886017.issue40239@roundup.psfhosted.org> |
2020-04-09 14:42:29 | serhiy.storchaka | link | issue40239 messages |
2020-04-09 14:42:29 | serhiy.storchaka | create | |
|