Created
December 8, 2010 16:45
-
-
Save blackrobot/733532 to your computer and use it in GitHub Desktop.
A Python recipe for Egg Nog
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
#!/usr/bin/env python | |
from measurments.abstract import SPRINKLE | |
from delicious import GOOD | |
def mix_ingredients(ingredients): | |
mixture = [] | |
for key in ingredients.iterkeys(): | |
mixture.append("%s: %s" % (key, ingredients[key])) | |
return mixture | |
if __name__ == '__main__': | |
ingredients = { | |
'egg_yolks': 12, | |
'lbs_sugar': 1, | |
'cups_rum': 2, | |
'cups_bourbon': 2, | |
'quarts_whipping_cream': 2, | |
'egg_whites': 12, | |
'nutmeg': SPRINKLE, | |
} | |
egg_nog = mix_ingredients(ingredients) | |
assert egg_nog is GOOD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment