Because your object has no attribute dict when every object in python has attribute __dict__ which maps all objects attribute to it's value.
More detaild in doc: https://docs.python.org/3/library/stdtyp...t.__dict__
More detaild in doc: https://docs.python.org/3/library/stdtyp...t.__dict__