10000 Feature request: inter field invariants · Issue #304 · tobgu/pyrsistent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature request: inter field invariants #304

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

Closed
travis-leith opened this issue May 9, 2025 · 1 comment
Closed

Feature request: inter field invariants #304

travis-leith opened this issue May 9, 2025 · 1 comment

Comments

@travis-leith
Copy link

For example, imagine I have a class that represents some bounds on something, and it has a lower bound and an upper bound. If I want to make sure lower bound is less than upper bound, I must use a tuple field.
It might be convenient in this case, and in others, to be able to specify an invariant for the class itself, and that invariant can access multiple fields.

@travis-leith
Copy link
Author

never mind, I see that this is indeed a thing already

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
0