Loading topic
self and instance attributes, read @name decorator syntax, and tell class attributes from instance attributes. It covers what a class method is and what it receives. Alternative constructors, inheritance, and the choice betwee4 min readself is, and recognize @name decorator syntax above a function. It also assumes you know the difference between class attributes and instance attributes.4 min read__init__ and instance methods, and that you know what self refers to. It also assumes you have read the previous chapter on @classmethod and cls. A decorator is the @name line above a function. You do not need to know how decorators w3 min readself, and read the @name decorator syntax. It also assumes you know that a class attribute is shared by instances and an instance attribute belongs to one object. Earlier chapters introduced @classmethod and alternati3 min readself is, and can tell class attributes from instance attributes. You should also have seen @classmethod and @staticmethod once. Here you learn to decide which kind of method a piece of behavior belongs in.3 min read@classmethod and @staticmethod, and read decorator syntax. You don't need prior knowledge of descriptors. By the end you will know why t.to_fahrenheit() passes t automatically, why Temperature.from_fahrenheit(212) passes3 min readself is, and you understand @name decorator syntax. It also assumes you know the difference between class attributes and instance attributes. Class methods and static methods are simple, but a few mistakes come up again and again. Each s4 min read