Tagged articles
3 articles
Page 1 of 1
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.

Abstract Base ClassDesign PatternsPython
0 likes · 14 min read
Refactoring a Python Employee Management System to Eliminate Code Smells
MaGe Linux Operations
MaGe Linux Operations
Feb 6, 2018 · Fundamentals

Master Python Inheritance: Benefits, Pitfalls, and Best Practices

This article explains Python's object‑oriented programming fundamentals, introduces classes and instances, details how inheritance works, discusses its advantages and disadvantages—including issues with built‑in type subclassing—and offers practical guidance on multiple inheritance, method resolution order, and using super.

Abstract Base ClassInheritanceMRO
0 likes · 10 min read
Master Python Inheritance: Benefits, Pitfalls, and Best Practices