Re:Box – Python dictionary with dot notation
by eulenteufel on Friday December 17, 2021 @05:39PM
(#29599231)
I thought I wanted dictionaries with dot notation for a while. After some time I realized I didn't care about dictionary features like iterating over keys at all, I just needed a namespace.
`from types import SimpleNamespace` works for me.
Of course I don't want to say that there's no need for box, just that it's good to consider if you're actually looking for a dictionary.
`from types import SimpleNamespace` works for me.
Of course I don't want to say that there's no need for box, just that it's good to consider if you're actually looking for a dictionary.