I am learning OOP in python.
I am struggling why this is not working as I intended?
class Patent(object):
"""An object to hold patent information in Specific format"""
def __init__(self, CC, PN, KC=""):
self.cc = CC
self.pn = PN
self.kc = KC
class USPatent(Patent):
""""Class for holding information of uspto patents in Specific format"""
def __init__(self, CC, PN, KC=""):
Patent.__init__(self, CC, PN, KC="")
pt1 = Patent("US", "20160243185", "A1")
pt2 = USPatent("US", "20160243185", "A1")
pt1.kc
Out[168]: 'A1'
pt2.kc
Out[169]: ''
What obvious mistake I am making so that I am not able to get kc in USPatent instance?