Skip to content
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

[feature] Immutable, hashable models, with text representations #243

Open
lmmarsano opened this issue Sep 20, 2021 · 0 comments
Open

[feature] Immutable, hashable models, with text representations #243

lmmarsano opened this issue Sep 20, 2021 · 0 comments

Comments

@lmmarsano
Copy link

Similar to objects we get from frozen dataclasses or frozen pydantic models, simple data that we can compare and treat as values would be useful for debugging (eg, stack traces in test frameworks that reveal values) & general productivity.
Basically, define

  • __hash__
  • __repr__

and block setting properties.
Models with different attributes can already be created via serialize & deserialize methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant