Tag

abstract base class

1 views collected around this technical thread.

Python Programming Learning Circle
Python Programming Learning Circle
Mar 3, 2025 · Fundamentals

Using Abstract Base Classes (ABC) to Implement Interfaces in Python

This article explains how Python's Abstract Base Classes provide interface‑like contracts for OOP, demonstrates their use with a payment‑gateway example, shows how to build a plugin system, and highlights the benefits of early error detection, clear conventions, and extensibility.

OOPPlugin SystemPython
0 likes · 9 min read
Using Abstract Base Classes (ABC) to Implement Interfaces in Python
Python Programming Learning Circle
Python Programming Learning Circle
Mar 11, 2022 · Fundamentals

Refactoring a Python Employee Management System to Eliminate Code Smells

This article explains common Python code smells in an employee‑management example, demonstrates why practices such as using raw strings for roles, duplicated search methods, excessive isinstance checks, and vague boolean flags are problematic, and provides a step‑by‑step refactor using Enums, abstract base classes, list comprehensions, custom exceptions, and clearer method separation.

Pythonabstract base classcode smells
0 likes · 14 min read
Refactoring a Python Employee Management System to Eliminate Code Smells