Skip to content

Instantly share code, notes, and snippets.

@cstrap
Last active March 2, 2021 08:21
Show Gist options
  • Save cstrap/dbc39c79fbe28edea141aacad4fcd100 to your computer and use it in GitHub Desktop.
Save cstrap/dbc39c79fbe28edea141aacad4fcd100 to your computer and use it in GitHub Desktop.
attrs = {'some_property': 'some_value'}
Obj = type('ObjectClassName', (object,), attrs)
obj = Obj()
print(obj.some_property)
# >>> some_value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment