Skip to content

Commit

Permalink
better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Apr 26, 2024
1 parent a258dc0 commit 8bc7448
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion anemoi/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@


class DotDict(dict):
"""A dictionary that allows access to its keys as attributes"""
"""A dictionary that allows access to its keys as attributes.
>>> d = DotDict({"a": 1, "b": {"c": 2}})
>>> d.a
1
>>> d.b.c
2
>>> d.b = 3
>>> d.b
3
"""

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down

0 comments on commit 8bc7448

Please sign in to comment.