-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitem.py
29 lines (25 loc) · 869 Bytes
/
item.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from KINCluster import Item
class myItem(Item):
def dump(self):
return {
key: value
for key, value in zip(self.keys, self.values)
}
def __hash__(self):
return self.__e
def __repr__(self):
title_quote = " ".join(self.title_quote)
content_quote = " ".join(self.content_quote)
return " ".join([title_quote,
content_quote,
self.title,
self.content,
self.entities])
def __str__(self):
title_quote = " ".join(self.title_quote)
content_quote = " ".join(self.content_quote)
return " ".join([title_quote,
content_quote,
self.title,
self.content,
self.entities])