def add_testimony(self, new_testimony): Generator.add_testimony(self, new_testimony) with open(self.file_name, "a") as f: f.write(self.str(new_testimony))