Skip to content

Instantly share code, notes, and snippets.

@rbpasker
Forked from anonymous/gist:c564b4dfb63d065f3805
Last active January 3, 2016 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rbpasker/e2b188fa56f9be0d956c to your computer and use it in GitHub Desktop.
Save rbpasker/e2b188fa56f9be0d956c to your computer and use it in GitHub Desktop.
actions = { 'content' : lambda x : print x}
def make_md(self, file):
for id in sorted(file.iterkeys()):
action = actions.get(id)
if action != None:
action(file.get(id))
when I run it I get:
actions = { 'content_created' : lambda x : print x}
^
SyntaxError: invalid syntax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment