Skip to content

Instantly share code, notes, and snippets.

@iisaka51
Created October 25, 2022 04:42
Show Gist options
  • Save iisaka51/75300c2a3b40ce6ea660d4edc0c30494 to your computer and use it in GitHub Desktop.
Save iisaka51/75300c2a3b40ce6ea660d4edc0c30494 to your computer and use it in GitHub Desktop.
adict immuatble
In [8]: users[0].freeze()
In [9]: try:
...: users[0].age=20
...: except AttributeError as e:
...: print(e)
...:
User frozen object cannot be modified.
In [10]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment