dogs.dict()序列化,为什么打印没有weight这个属性?
dogs = Dog(birthday=date.today(), weight=6.66, sound=[{'sound': 'w w~~'}, {'sound': 'y y~~'}]) print(dogs.dict()) >> {'birthday': datetime.date(2021, 12, 1), 'sound': [{'sound': 'w w~~'}, {'sound': 'y y~~'}]}
dogs = Dog(birthday=date.today(), weight=6.66, sound=[{'sound': 'w w~~'}, {'sound': 'y y~~'}]) print(dogs.dict()) >> {'birthday': datetime.date(2021, 12, 1), 'sound': [{'sound': 'w w~~'}, {'sound': 'y y~~'}]}
2021-12-01
举报