twitter module: prettify top level twitter.all

This commit is contained in:
Dima Gerasimov 2020-05-22 19:00:02 +01:00
parent c410daa484
commit 03773a7b2c
7 changed files with 75 additions and 55 deletions

10
my/twitter/common.py Normal file
View file

@ -0,0 +1,10 @@
from itertools import chain
from more_itertools import unique_everseen
def merge_tweets(*sources):
yield from unique_everseen(
chain(*sources),
key=lambda t: t.id_str,
)