Last active
September 13, 2022 19:14
-
-
Save mohammadali66/cd4b24987f403fd65daab12e7749167c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Batch: | |
... | |
def __eq__(self, other): | |
if not isinstance(other, Batch): | |
return False | |
return other.reference == self.reference | |
def __hash__(self): | |
return hash(self.reference) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment