-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read Only version #74
Comments
Had the same issue. https://gist.github.com/Ohjeah/41b103e4bc15452af5bbc89747962369 |
Hey! Unfortunately, it's (afaik) not possible to get If I'm not misunderstanding the question you could always call Cheers, Mats |
If you just use |
That's true @Ohjeah. |
Hence the LockedDict (see the gist). It serves as a read only version of addict.Dict. Works well for me if I want an exception rather a None value return on a failed item lookup. |
How can I make this read-only and when you try to add an attribute it will raise an exception, something like a Frozen Addict.
Also why does this create an empty dict on when trying to access an attribute that does not exist. It should raise an exception unless you are setting an attribute that does not exist
The text was updated successfully, but these errors were encountered: