Skip to content

Instantly share code, notes, and snippets.

@ShahriyarR
Created December 6, 2022 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShahriyarR/76da82dd536926c9671de881d244fdf1 to your computer and use it in GitHub Desktop.
Save ShahriyarR/76da82dd536926c9671de881d244fdf1 to your computer and use it in GitHub Desktop.
@icontract.invariant(
lambda self: len(self) == 0 or len(self) == 1,
"There can be no or only single secret data stored",
)
class ReadOnce(metaclass=Final):
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment