Is a constructor __init__ necessary for a class in Python?
问题 I read that the constructor is like the first argument passed to the class, which makes sense to me since the parameters seem to be passed to the class via the __init__ method. For example, class NewsStory(object): def __init__(self, guid, title, subject, summary, link): self.guid = guid self.title = title self.subject = subject self.summary = summary self.link = link def get_guid(self): return self.guid def get_title(self): return self.title def get_subject(self): return self.subject def get