Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kevinmmartins/8fc7c9faadd9bc1031f22f2f828a0a83 to your computer and use it in GitHub Desktop.
Save kevinmmartins/8fc7c9faadd9bc1031f22f2f828a0a83 to your computer and use it in GitHub Desktop.
Create a object with dict atributes
class Aggregator:
def __init__(self, *initial_data):
for dictionary in initial_data:
for key in dictionary:
setattr(self, key, dictionary[key])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment