Object-Oriented Design Patterns in Python - Chain of Responsibility
Pass a request along a sequence of potential handlers. Ideal for middleware, event handling, and logging, this pattern cleanly decouples the sender from the receiver.
Object-Oriented Design Patterns in Python - The Template Method
Define the skeleton of an algorithm while letting subclasses fill in the details. A perfect pattern for enforcing structure while maximizing code reuse.
Object-Oriented Design Patterns in Python - The State Pattern
Allow objects to change their behavior when their internal state shifts. Learn to replace messy if-elif chains with clean, maintainable state-transition logic.
Object-Oriented Design Patterns in Python - The Iterator Pattern
Navigate collections without exposing internal structure. We will deep-dive into Python’s __iter__ and __next__, comparing traditional iterators with powerful Python Generators.
Object-Oriented Design Patterns in Python - The Strategy Pattern
Swap algorithms on the fly! Learn to encapsulate behaviors into interchangeable objects, and see how Python’s first-class functions can simplify this pattern to a single line.
Member discussion