Search across all documentation pages
13 pages in this section.
How attribute lookup, dunder methods, and classes-as-objects actually work underneath every OOP feature in Python - the model behind inheritance, dataclasses, and protocols alike.
Learn object-oriented programming in Python with 10 examples covering classes, instances, self, attributes, methods, inheritance, and more.
Understand Python's dunder (magic) methods to enable custom classes to use operators, context managers, iteration, and string formatting.
Learn to use Python dataclasses to create data-holding classes with less boilerplate, define fields, set defaults, and make immutable objects.
Understand Python's multiple inheritance, Method Resolution Order (MRO), and super(). Learn to use mixins for shared behavior and debug method overrides.
Understand Python's instance, class, and static methods. Learn when to use each for object operations, class-level factories, and namespaced utility functions.
Learn to use Python enums like StrEnum and Flag to define named constants, replace magic values, and implement robust logic.
Learn Python object-oriented best practices, including modeling data with dataclasses, preferring composition, and designing clear, testable APIs.
A single-page roundup of every highlight bullet from the 12 pages in the OOP section, grouped by source page so you can scan all 48 takeaways without opening each article individually.