Skip to content

Instantly share code, notes, and snippets.

@ericdill
Created June 5, 2015 17:48
Show Gist options
  • Save ericdill/365b8b35c2d5822969db to your computer and use it in GitHub Desktop.
Save ericdill/365b8b35c2d5822969db to your computer and use it in GitHub Desktop.
dct = {
'thing1': 'a',
'thing3': 'c',
'thing4': 'd',
'thing5': 'e'
}
def plotting_function(thing1=None, thing2=None, thing3=None, **kwargs):
print('thing1 = %s' % thing1)
print('thing2 = %s' % thing2)
print('thing3 = %s' % thing3)
print('kwargs = {}'.format(kwargs))
plotting_function(**dct)
"""Outputs the following:
thing1 = a
thing2 = None
thing3 = c
kwargs = {'thing4': 'd', 'thing5': 'e'}
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment