So, I was playing around with Python while answering this question, and I discovered that this is not valid:
o = object() o.attr = \'hello\'
https://docs.python.org/3/library/functions.html#object :
Note: object does not have a __dict__, so you can’t assign arbitrary attributes to an instance of the object class.