Python

Notes on the Python programming language — testing, async, type hints, and practical patterns.

String interning in Python

Learn how Python's string interning optimizes memory by caching strings and using sys.intern() for custom string caching to improve performance.

Structural subtyping in Python

Implement Go-style structural subtyping in Python with Protocol for duck typing and interface-based APIs without inheritance dependencies.

Deciphering Python's metaclasses

Explore Python metaclasses for metaprogramming: learn how classes are created, customize class behavior, and understand type as the default metaclass.