We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
freeze
The text was updated successfully, but these errors were encountered:
Hello, is it possible to add an attribute to a benedict? I wanted to add an is_frozen attribute, but I encountered an error like this:
is_frozen
raise AttributeError(attr_message) from None AttributeError: 'benedict' object has no attribute 'is_frozen'
I've written:
class benedict(KeyattrDict, KeypathDict, IODict, ParseDict): def __init__(self, *args, **kwargs): .... self.is_frozen = False def freeze(self): self.is_frozen = True def __setitem__(self, key, value): if self.is_frozen: raise TypeError("This dictionary is immutable") return super().__setitem__(key, self._cast(value))
Sorry, something went wrong.
fabiocaccamo
No branches or pull requests
The text was updated successfully, but these errors were encountered: