Python
Notes on the Python programming language — testing, async, type hints, and practical patterns.
Standardize Django REST Framework error responses using custom exception handlers to match Microsoft's REST API guidelines format.
Understand when to use constrained TypeVar vs Union in Python type hints for consistent types across function parameters and return values.
Avoid memory leaks when caching instance methods with lru_cache by making cache containers local to instances instead of global.
Crop text to character limits without breaking words using Python's textwrap.shorten for clean truncation with customizable placeholders.
Learn how Python's string interning optimizes memory by caching strings and using sys.intern() for custom string caching to improve performance.
Implement Go-style structural subtyping in Python with Protocol for duck typing and interface-based APIs without inheritance dependencies.
Implement automatic attribute delegation in Python composition using __getattr__ magic method for inheritance-like attribute access patterns.
Learn how to access Python classmethods like property methods using metaclasses or Python 3.9+ decorator stacking for Enum classes.
Validate subclass schemas at definition time with Python's __init_subclass__ hook, a cleaner alternative to metaclasses for enforcing structure.
Integrate tqdm progress bars with multiprocessing.imap_unordered for visual feedback on parallel task execution across worker processes.
Test Python infinite loops safely using daemon threads with timeouts, allowing tests to complete without hanging or blocking execution.
Discover how Python's functools.partial automatically detects and flattens nested partial applications for optimal performance and cleaner code.
Build a scalable Python configuration system with Pydantic and dotenv. Manage dev, staging, and production configs with type validation.
Build custom data structures with Python's collection.abc mixins, abstract base classes, and interfaces for dict-like and set-like objects.
Explore Python metaclasses for metaprogramming: learn how classes are created, customize class behavior, and understand type as the default metaclass.