Why can’t you add attributes to object in python?

(Written in Python shell) >>> o = object() >>> o.test = 1 Traceback (most recent call last): File "<pyshell#45>", line 1, in <module> o.test = 1 AttributeError: 'object' object has no attribute 'test' >>> class test1: pass >>> t = test1() >>> t.test Traceback (most recent call last): File "<pyshell#50>", line 1, in <module> t.test … Read more