Skip to content

Instantly share code, notes, and snippets.

@jdmichaud
Created September 8, 2018 15:04
Show Gist options
  • Save jdmichaud/356ac84b058f5a3746f453806186767c to your computer and use it in GitHub Desktop.
Save jdmichaud/356ac84b058f5a3746f453806186767c to your computer and use it in GitHub Desktop.
Python object literal
# Something that look like a javascript object literal
class Object:
def __init__(self, **kwds):
self.__dict__.update(kwds)
def __str__(self):
return str(self.__dict__)
test = Object(
key=value
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment