DotDict#
- class brainstate.util.DotDict(*args, **kwargs)#
Dictionary with dot notation access to nested keys.
DotDict allows accessing dictionary items using attribute syntax, making code more readable when dealing with nested configurations.
Examples
>>> config = DotDict({'model': {'layers': 3, 'units': 64}}) >>> config.model.layers 3 >>> config.model.units = 128 >>> config['model']['units'] 128
- All dictionary keys become accessible as attributes unless they conflict
- with built-in methods.