Commit 5e15cd42 authored by Lucas Bourneuf's avatar Lucas Bourneuf

fix test

parent 33b3460d
......@@ -40,6 +40,7 @@ def join_on_genstr(funcgen:callable, joiner:str='') -> str:
>>> def g(c): return c+'bc'
>>> join_on_genstr(g)('a')
'abc'
"""
if inspect.isgeneratorfunction(funcgen) or inspect.isgenerator(funcgen):
return wraps(funcgen)(lambda *a, **k: joiner.join(funcgen(*a, **k)))
......@@ -97,7 +98,7 @@ def reverse_dict(d:dict, aggregator=set, multiple_values:bool=False) -> dict:
and values as keys.
>>> sorted(tuple(reverse_dict({1: 2, 2: 3, 4: 2}).items()))
((2, {1, 4}), (3, {2}))
[(2, {1, 4}), (3, {2})]
"""
out = defaultdict(list)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment