Loading topic
__init__ sets instance attributes, and you can read basic try/except code. You do not need to know decorators yet. Properties come in later chapters.2 min read__init__, read basic decorator syntax, and raise and catch exceptions.2 min read__init__, assign instance attributes, and catch exceptions. You do not need to know properties yet.3 min read__init__, know that a single leading underscore marks an attribute as internal by convention, and can catch exceptions such as AttributeError.2 min read__init__, you know that self.x = ... creates an instance attribute, and you have seen the @ decorator syntax. You should also know the single-underscore convention for internal names, which the previous chapter covered.2 min read__init__, use the @ decorator syntax, and catch exceptions. It also assumes you have seen a basic @property getter. Here you will use a getter alone to make an attribute read-only.2 min read__init__, use the @ decorator syntax, raise and catch exceptions, and write a read-only @property getter. Here you add a setter, so assignment to an attribute can check the new value before storing it.2 min read__init__, use the @ decorator syntax, and raise and catch exceptions. It also assumes you know the basic @property getter and setter pattern from the previous chapters.2 min read__init__, read the @ decorator syntax, and raise and catch exceptions. It also assumes you have seen a basic @property getter.3 min read__init__, use the @ decorator syntax, and raise and catch exceptions. You should also know how @property getters and setters work from earlier chapters.2 min read@property, and that you know how instance attributes are stored in __dict__. You should also be comfortable with computed properties from the earlier chapter.2 min readdel obj.attr does on a plain attribute. A deleter is the third and least used part of a property. It lets you control what happens when someone runs del obj.attr.2 min read__init__, use @property with a getter and setter, and read the @ decorator syntax. Here you will see that @property is a shortcut for an ordinary function call. Knowing this explains several confusing errors.2 min read@property getters and setters, and that you know basic inheritance and super().2 min read@property and setters, and that you know how __init__ and class attributes work. A descriptor is the general mechanism that property is built on. You rarely need to write one, but knowing how they work explains several behaviors you have alrea2 min read