How is it possible that
class EmptyClass: def __init__(self): pass e = EmptyClass() ea = 123
works and:
o = object() oa = 123
not ( AttributeError: 'object' object has no attribute 'a' ), but
print isinstance(e, object) >>> True
?
What is object() good if you cannot use it like that?
R2-D2 source share