I have a class that contains a dictionary of properties current_properties, the properties that can be added and their corresponding data types are predefined in valid_properties dictionary:
self.valid_properties = {'name': str, 'number': int, 'point_data': list}
self.current_properties = {'name': 'user_1'}
Now, I want to write a method that initializes every new added property to its corresponding empty value. e.g. number is int, once added, new state should be:
self.current_properties = {'name': 'user_1', 'number': 0}
if I add point_data the new state should be:
self.current_properties = {'name': 'user_1', 'number': 0, 'point_data':[]}
How can I get this done?