Skip to content

Instantly share code, notes, and snippets.

@coilysiren
Last active August 29, 2015 13:59
Show Gist options
  • Save coilysiren/10691309 to your computer and use it in GitHub Desktop.
Save coilysiren/10691309 to your computer and use it in GitHub Desktop.
beacuse *args and **kwargs are too obscure
def unpack (collection):
'''unpack arguments from a collection (list or dictionary)'''
if type(collection) == list:
return *collection
if type(collection) == dict:
return **collection
else: print('invalid input to unpack()')
#wait its not nearly this simple...
#...I'll keep looking into this, gimme a bit