Skip to main content
Loading page…
Python Mastery
Chapter 20
Lesson 4 of 4
Pythonic Patterns & Anti-Patterns
Contents
Notes
Tutor
Concept
When a Pattern Is Overkill: YAGNI
Loading activity…
Previous
1 / 11
Continue
Contents
Notes
Discussion
Tutor
25 min
11 activities
0 of 11 done
In this lesson
1
When a Pattern Is Overkill: YAGNI
2
Composition Over Inheritance
3
The Registry Pattern
4
Common Python Anti-Patterns to Avoid
5
Annotated: Registry with Decorator-Based Auto-Registration
6
Practice: Fix the Anti-Patterns
7
Composition vs. Inheritance: Which Is Appropriate?
8
Pattern or Anti-Pattern?
9
Order: Simplest to Most Complex Solution
10
The Golden Rule: Patterns Are Vocabulary, Not Goals
11
Reflection: Composition Over Inheritance
Objectives
Identify when a design pattern adds clarity vs. unnecessary ceremony
Apply composition over inheritance and explain why it matters
Implement the registry pattern for extensible plugin systems
Recognize and fix the most common Python anti-patterns
Chapter 20 · Design Patterns in Python
Creational Patterns
Structural Patterns
Behavioral Patterns
Pythonic Patterns & Anti-Patterns
Previous: Behavioral Patterns
Next: Core Python Idioms