Idris01 / AirBnB_clone

0 stars 1 forks source link

Create BaseModel from dictionary #6

Open Idris01 opened 1 year ago

Idris01 commented 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'>