12345678910111213141516171819202122232425 |
- class Config(object):
- def __init__(self, config_dict: dict):
- for key, val in config_dict.items():
- self.__setattr__(key, val)
- def copy(self, new_config_dict: dict):
- """
- Copies this config into a new config object, making
- the changes given by new_config_dict.
- """
- ret = Config(vars(self))
- for key, val in new_config_dict.items():
- ret.__setattr__(key, val)
- return ret
|