What I want to do in my code:
myobj = <SomeBuiltinClass>()
myobj.randomattr = 1
print myobj.randomattr
...
I can implement a custom SomeClass that implements __setattr__
__getattr__
.
But I wonder if there is already a built-in Python class or simple way to do this?