Created
March 7, 2021 09:35
-
-
Save iktakahiro/67c15cc23994bb5a1bbcfeae58b9eefb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Book: | |
def __init__(self, id: str, title: str): | |
self.id: str = id | |
self.title: str = title | |
def __eq__(self, o: object) -> bool: | |
if isinstance(o, Book): | |
return self.id == o.id | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment