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

Consider implementing custom __eq__ for indices classes #117

Open
pipermerriam opened this issue Mar 8, 2019 · 0 comments
Open

Consider implementing custom __eq__ for indices classes #117

pipermerriam opened this issue Mar 8, 2019 · 0 comments

Comments

@pipermerriam
Copy link
Member

NOTE: it isn't clear whether there is much benefit to be gained from this approach but worth considering for added safety.

We use custom integer subclasses for the various indices types. A naive comparison of 1 == LocalIdx(1) will currently return True.

If we want to be extra strict we should consider implementing __eq__ methods on these to differentiate them from 1) each other and 2) base int values.

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