Im trying to create a class called Record, though when I try to use it, something goes wrong. Im sure im overlooking something simple. Does anyone mind taking a look?
class Record: def __init__(self, model): self.model= model self.doc_date = [] self.doc_pn = [] print("Record %s has been added.\n") % self def add_doc_date(self, declaration_date): self.doc_date.append(declaration_date) def add_doc_pn(self, declaration_pn): self.doc_pn.append(declaration_pn) def __str__(self): res = "Name: " + self.model + "\n" res = res + "Standard Part Numbers:" + str(self.std_pn) + "\n" res = res + "Declaration Part Numbers" + str(self.doc_pn) + "\n" return res