Search
- Filter Results
- Location
- Classification
- Include attachments
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/11%3A_Classes/11.02%3A_Classes_and_InstancesThis page explains the creation and utilization of classes in Python, focusing on the significance of instance attributes, class attributes, and the __init__() method. It describes how classes act as ...This page explains the creation and utilization of classes in Python, focusing on the significance of instance attributes, class attributes, and the __init__() method. It describes how classes act as blueprints for objects that symbolize real-world entities and provides examples of defining classes and creating instances. A clear distinction between instance and class attributes is made, alongside practical exercises to enhance understanding.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/13%3A_Inheritance/13.02%3A_Attribute_AccessThis page outlines learning objectives for implementing subclasses in Python, detailing how they can inherit attributes from superclasses and define instance attributes in their `__init__()` method. I...This page outlines learning objectives for implementing subclasses in Python, detailing how they can inherit attributes from superclasses and define instance attributes in their `__init__()` method. It includes examples of subclass creation, attribute access, and display method modification. The page also offers practical exercises that encourage readers to apply these concepts, specifically through the Dessert and Cupcake example.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/11%3A_Classes/11.04%3A_Overloading_OperatorsThis page explains magic methods (dunder methods) in Python that help users interact with custom classes, focusing on operator overloading for arithmetic and comparison actions. It highlights how to d...This page explains magic methods (dunder methods) in Python that help users interact with custom classes, focusing on operator overloading for arithmetic and comparison actions. It highlights how to define these methods to customize class behavior, with examples using an Account class. Additionally, it features exercises for practical application, such as merging exercise logs and enhancing the Account class functionalities.