Created
December 16, 2012 12:50
-
-
Save suzaku/4306895 to your computer and use it in GitHub Desktop.
try plac
This file contains hidden or 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 plac | |
import random | |
@plac.annotations(name="your name") | |
def hello(name): | |
"Greet you half of the time, and otherwise * you" | |
if random.randint(0, 10) > 5: | |
print "Hello %s" % name | |
else: | |
print "Screw you. I'm ... going ... home~" | |
if __name__ == '__main__': | |
plac.call(hello) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment