Open Idris01 opened 1 year ago
Create BaseModel from dictionary as describe in Task 4
Previously we created a method to generate a dictionary representation of an instance (method to_dict()).
Now it’s time to re-create an instance with this dictionary representation.
<class 'BaseModel'> -> to_dict() -> <class 'dict'> -> <class 'BaseModel'>
Create BaseModel from dictionary as describe in Task 4
Previously we created a method to generate a dictionary representation of an instance (method to_dict()).
Now it’s time to re-create an instance with this dictionary representation.