In python, when self can be omitted?
问题 Codes below defined Duck class as composited from Bill class and Tail class. My questions is that as for the method about() inside Duck class definition, why can one write bill.description and tail.length ? Is self omitted here? If yes, when can I omit self ? Can I omit them inside __init__ method? class Bill(): def __init__(self, description): self.description = description class Tail(): def __init__(self, length): self.length = length class Duck(): def __init__(self, bill, tail): self.bill