Created
August 8, 2014 15:02
-
-
Save danielthiel/deee5957d4bc0bee3018 to your computer and use it in GitHub Desktop.
arguments args, keyword arguments kwargs with functions (more to come!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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