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
import random | |
def coroutine(func): | |
"""A decorator to automatically prime coroutines""" | |
def start(*args, **kwargs): | |
cr = func(*args, **kwargs) | |
next(cr) | |
return cr | |
return start |
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
[T]he difference between a bad programmer and a | |
good one is whether he considers his code or his | |
data structures more important. Bad programmers | |
worry about the code. Good programmers worry about | |
data structures and their relationships. | |
-- Linus Torvalds | |
~~~ | |
Clarity and brevity sometimes are at odds. | |
When they are, I choose clarity. | |
-- Jacob Kaplan-Moss |