4 ms·
If all you want is the dot and indexing syntactic sugar: class Box(dict): def __init__(self, **kwargs) super(Box, self).__init__(kwargs) self
by sampwing 9y ago
If all you want is the dot and indexing syntactic sugar:
class Box(dict):
def __init__(self, **kwargs)
super(Box, self).__init__(kwargs)
self.__dict__.update(kwargs)