I'm sure this must be simple, but I could not find the answer.
I have a dictionary like:
d = {'a': 1, 'b':2}
I'd like to access that via dot notation, like: d.a
The SimpleNamespace
is designed for this, but I cannot just pass the dict into the SimpleNamespace constructor.
I get the error: TypeError: no positional arguments expected
How do I initialize the SimpleNamespace from a dictionary?