mirror of
https://github.com/Dvorinka/SpotifyRecAlg.git
synced 2026-06-04 04:23:02 +00:00
12 lines
217 B
Python
12 lines
217 B
Python
def coroutine(func):
|
|
"""
|
|
Decorator: primes `func` by advancing to first `yield`
|
|
"""
|
|
|
|
def start(*args, **kwargs):
|
|
cr = func(*args, **kwargs)
|
|
next(cr)
|
|
return cr
|
|
|
|
return start
|