Skip to main content

29 docs tagged with "oop"

View all tags

Dataclasses - Code Generation, Immutability, and Production Patterns

Master Python's @dataclass decorator at engineering depth - what it generates, field() and default_factory, frozen=True for immutability, __post_init__ for validation, ClassVar vs InitVar, inheritance with dataclasses, ordering, and production patterns in FastAPI and config systems.

Module 01 - Object-Oriented Programming Overview

Master Python's object model at engineering depth - classes, instances, dunder methods, encapsulation, inheritance, MRO, composition, abstract base classes, dataclasses, SOLID principles, and production design patterns.

MRO - Method Resolution Order and the C3 Linearisation Algorithm

Understand Python's Method Resolution Order at engineering depth - the diamond problem, C3 linearisation step by step, how super() traverses the MRO (not just "calls parent"), mixin patterns that depend on MRO, Django/Flask examples, and MRO failure cases.

Project 01 - Banking System Simulator

Build a banking system using Python OOP. Covers inheritance, @property validation, @classmethod factory methods, __repr__, overdraft protection, and transaction history.

Project 02 - Library Management System

Build a library management system using Python OOP. Covers __repr__, __eq__, __hash__, Abstract Base Classes, checkout systems with date tracking, overdue detection, and fine calculation.

Project 03 - Chess Engine (OOP Version)

Build a working chess engine in Python using ABCs, dunders, dataclasses, and composition. Covers Piece ABC, concrete piece classes, Board with __getitem__/__setitem__, Move dataclass, check detection, and algebraic notation.