Skip to content

Instantly share code, notes, and snippets.

@danielthiel
Created August 8, 2014 15:02
Show Gist options
  • Save danielthiel/deee5957d4bc0bee3018 to your computer and use it in GitHub Desktop.
Save danielthiel/deee5957d4bc0bee3018 to your computer and use it in GitHub Desktop.
arguments args, keyword arguments kwargs with functions (more to come!)
def kwargs_test(**kwargs):
print('search for keyword >foo<: {0}'.format(kwargs.get('foo') or 'nope...'))
if __name__ == "__main__":
kwargs_test(foo='success')
kwargs_test(bar='you dont see this')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment