Redowan's Reflections

Hi, I’m Redowan.

A roving amateur fumbling through software, systems, and sundry.

Recent writing

Static typing Python decorators

Type Python decorators accurately using ParamSpec and Concatenate to preserve wrapped function signatures and enable proper static analysis.

Inspect docstrings with Pydoc

View Python docstrings from the command line with pydoc or serve them as HTML documentation for modules, classes, and functions.

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.