first commit
This commit is contained in:
21
entry.py
Normal file
21
entry.py
Normal file
@ -0,0 +1,21 @@
|
||||
class Entry:
|
||||
|
||||
question = None
|
||||
answer = None
|
||||
url = None
|
||||
|
||||
def __init__(self, question, answer, url):
|
||||
self.question = question
|
||||
self.answer = answer
|
||||
self.url = url
|
||||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, Entry):
|
||||
if hash(self.question) == hash(other.question):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return False
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.question)
|
||||
Reference in New Issue
Block a user