How is it possible that
class EmptyClass:
def __init__(self):
pass
e = EmptyClass()
e.a = 123
works and:
o = object()
o.a = 123
does not (AttributeError: 'object' object has no attribute 'a'
) while
print isinstance(e, object)
>>> True
?
What is object()
good for then, when you cannot use it like this?