-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPeriodical.py
More file actions
39 lines (34 loc) · 1.39 KB
/
Periodical.py
File metadata and controls
39 lines (34 loc) · 1.39 KB
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
30
31
32
33
34
35
36
37
38
#Periodical
from Media import Media
class Periodical(Media):
def __init__ (self, callNum, title, subject, auth, desc, pub, pub_hist, series, note, related_title, other_title, gov_doc_id):
super().__init__(callNum, title, subject, note)
self.m_author = auth
self.m_description = desc
self.m_publisher = pub
self.m_publishingHistory = pub_hist
self.m_series = series
self.m_relatedTitle = related_title
self.m_otherTitle = other_title
self.m_gov_doc_id = gov_doc_id
def display(self):
print("=========================Search Result===============================\n")
print("Media type: Periodical\n")
super().display()
print("Author: ",self.m_author);
print("Description: ",self.m_description);
print("Publisher: ",self.m_publisher);
print("Publishing Hist:",self.m_publishingHistory);
print("Series: ",self.m_series);
print("Related title: ",self.m_relatedTitle);
print("Other title: ",self.m_otherTitle);
print("Gov doc ID: ",self.m_gov_doc_id);
def compare_other(self,search_other):
found1 = self.m_description.find(search_other)
found2 = self.m_notes.find(search_other)
found3 = self.m_series.find(search_other)
found4 = self.m_relatedTitle.find(search_other)
if found1 == -1 and found2 == -1 and found3 == -1 and found4 == -1:
return False
else:
return True