Skip to content

Instantly share code, notes, and snippets.

@kkirsche
Created August 17, 2016 02:45
Show Gist options
  • Select an option

  • Save kkirsche/b7c122f756ed551d006f434b99b91d57 to your computer and use it in GitHub Desktop.

Select an option

Save kkirsche/b7c122f756ed551d006f434b99b91d57 to your computer and use it in GitHub Desktop.
Python kwargs initialization method
def __init__(self, **kwargs):
for key, value in kwargs.items():
setattr(self, key, value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment