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

Remove __hash__ from some/most classes #12

Open
benmwebb opened this issue Apr 11, 2018 · 0 comments
Open

Remove __hash__ from some/most classes #12

benmwebb opened this issue Apr 11, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@benmwebb
Copy link
Contributor

Many IHM classes are hashable, as we stick them in dict to detect copies. This is potentially problematic as the classes are also mutable, so users of the library may be tempted to place objects in their own set or dict, modify them, and end up with bizarre behavior. We should probably fix this by removing the __hash__ method from these classes and handling copies in some other fashion (e.g. a mutable wrapper class similar to frozenset vs. set).

@benmwebb benmwebb added the bug Something isn't working label Apr 11, 2018
@benmwebb benmwebb self-assigned this Apr 11, 2018
@benmwebb benmwebb changed the title Remove __hash__ from some/most classes Remove __hash__ from some/most classes Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant