Expected Behavior
The __hash__ methods should not be implemented like this:
def __hash__(self) -> int:
return hash((id(self), self.name))
Objects with the __hash__ method implemented in such a way are not being deduplicated correctly in e.g. sets and dicts.
Current Behavior
Steps to reproduce
Specifications
- Version:
- Platform:
- Subsystem:
Possible Solution
Expected Behavior
The
__hash__methods should not be implemented like this:Objects with the
__hash__method implemented in such a way are not being deduplicated correctly in e.g. sets and dicts.Current Behavior
Steps to reproduce
Specifications
Possible Solution