I am trying to understand the following piece of code:
class Config(dict): def __init__(self): self.__dict__ = self
What is the purpose of the line self.__dict__ = self ? I suppose it overrides the default __dict__ with something that just returns the object itself, but since Config inherits from dict , I could not find any difference with the default behavior.
source share