OOP

Object-oriented programming concepts: classes, objects, inheritance, encapsulation, and polymorphism.

Python: Property Decorators, @property, getter, setter

Java developers write getters and setters for every field, just in case one ever needs validation. Python skips that ceremony entirely. A Python property lets you ship a plain attribute today and slip validation or a computed value behind it tomorrow, without touching a single caller. This post covers @property getters, setters, and deleters, plus the patterns you will actually reuse. “A good API is not just easy to use but also hard to misuse.” Joshua Bloch, Effective Java Last ... Read More

Python: Abstract Classes & Interfaces (ABC Module)

Learn the Python abstract class with the ABC (Abstract Base Class) module. Understand @abstractmethod, when to use abstract classes vs duck typing, and how to enforce method contracts across your class hierarchies. “A good design principle: always program to an interface, not an implementation.” Gang of Four, Design Patterns Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Intermediate | Reading Time: 12 minutes Prerequisites: Inheritance, Polymorphism A Python abstract class is a checklist that your subclasses are ... Read More

Python: Magic Methods (__str__, __repr__, __len__, __eq__)

Python magic methods (also called dunder methods) like __str__, __repr__, __len__, __eq__, and __getitem__ are the hooks that let your own classes plug into built-in functions such as print(), len(), and the comparison operators. This reference walks through each one with tested examples. “In Python, the special method names allow your objects to implement, support, and interact with basic language constructs.” Luciano Ramalho, Fluent Python Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Intermediate | Reading Time: ... Read More