Created
January 27, 2020 07:22
-
-
Save kunigami/730a28064cdc036d6144b978f445e8ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def coroutine(fn): | |
def start(*args, **kwargs): | |
gen = fn(*args, **kwargs) | |
next(gen) | |
return gen | |
return start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment