Object-Oriented Python
Classes, objects, inheritance, the data model, dataclasses, enums and protocols: how to model real things in code and design classes that stay easy to change.
Until now you have worked with values Python gave you: numbers, strings, lists, dictionaries. This phase teaches you to make your own kinds of values. A class describes a new kind of thing (a dog, a bank account, a chat message), and an object is one real example of it. You will learn how to give objects data and behaviour, how they find their attributes, and how Python decides which method runs.
Then you meet the tools professionals reach for every day: properties for checked attributes, inheritance and mixins, special methods that make your objects work with len, ==, + and for, dataclasses and enums for plain data, and abstract classes and protocols for swappable parts. Each tool comes with the reasons to use it and the signs that you should not.
The phase ends with design. When should you inherit, when should you compose, when is a function or a dataclass better than a class, and what does an object really cost in memory? These are the questions that separate code that is pleasant to change from code that fights you. The same ideas shape the AI code you will write later: messages and tool results are dataclasses, model status values are enums, and a swappable model client is a protocol.
Practise this phase
Hands-on exercises: write the code, run it, and press Check to have it tested automatically.