Created
September 8, 2018 15:04
-
-
Save jdmichaud/356ac84b058f5a3746f453806186767c to your computer and use it in GitHub Desktop.
Python object literal
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
# 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