Python course

Python Level 6: Object-Oriented Python

Object-Oriented Python is level 6 of 17 of the LoWisa Python course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-16

Classes and Objects

  • class and __init__. A class is a blueprint; __init__ runs on each new instance and sets its attributes through self.
  • self. self is the instance itself, passed automatically as the first parameter of every method.
  • Instance versus class attributes. Attributes set on self belong to one instance; attributes on the class are shared by all of them.

Inheritance, Composition and Protocols

  • Inheritance. A subclass extends a parent, reusing behaviour and overriding what differs: super() reaches the parent’s version.
  • Composition. Composition wires small objects together instead of subclassing: usually the more flexible design in Python.
  • Duck typing. Python cares what an object can DO, not what it is: if it quacks, it passes: that is duck typing.

Dataclasses and Domain Models

  • Dataclasses. The dataclass decorator writes __init__, __repr__ and __eq__ for you from the field declarations alone.
  • Frozen dataclasses. A frozen dataclass is immutable: attempts to reassign a field raise, making value objects trustworthy.
  • Modelling a domain. Good models name the business: an Order with items and a total beats three loose dicts passed in parallel.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Python Level 6: Object-Oriented Python cover?

Classes and Objects, Inheritance, Composition and Protocols, Dataclasses and Domain Models: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 5: Modules & Packages, which covers Modules and Imports, Packages and Project Structure, Virtual Environments and Dependencies.

Learn Python on your phone

The first level is free. LoWisa is on Google Play and the App Store.