Redowan's Reflections — Page 17
Recent writing
Longer articles, short notes, and things I'll probably need to look up again.
Browse the archiveReplace complex if-elif chains with functools.singledispatch for type-based function dispatch and cleaner polymorphic behavior in Python.
Deep dive into Python context managers. Learn to write custom managers with __enter__/__exit__, use contextlib decorators, and manage resources elegantly.
Master Python dataclasses to eliminate boilerplate code. Learn ordering, immutability, hashing, default values, and post-init processing.