Skip to content

Instantly share code, notes, and snippets.

@urschrei
Created September 4, 2011 15:16
Show Gist options
  • Save urschrei/1193001 to your computer and use it in GitHub Desktop.
Save urschrei/1193001 to your computer and use it in GitHub Desktop.
wrap() isn't unpacking the list
#!/usr/bin/env python
def wrap(f):
def enc(*args):
for item in args:
f(item)
return enc
@wrap
def prt(arg):
# do something with the dict
print arg.keys()
prt({'a': 'foo'})
#this fails
prt([{'b': 'bar'}, {'c': 'baz'}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment