I create an object of class datetime.date - d. And I want to get variables of class object d. I use dict for it. This attribute work in simple code:
class Simple:
def __init__(self, name, age):
self.name = name
self.age = age
a = Simple("Bob", 30)
print(a.__dict__)
{'name': 'Bob', 'age': 30}
But it doesn't work with class datetime.date. Why? datetime.date - this is also a class, like Simple.
d = datetime.date(2020, 5, 11)
print(d.__dict__)
AttributeError: 'datetime.date' object has no attribute 'dict'