Skip to main content

Command Palette

Search for a command to run...

Python

Deep-dive series for software engineers learning Python the way they learned their first language — by understanding why, not just memorizing syntax. Each series tackles one concept completely, from the problem it solves to the working code you'll write in real projects.


Python Context Managers: A Deep Dive

5 articles · Resource Management

You've typed with open(...) a hundred times. But few developers can explain what with actually does, why the file still closes when your code crashes, or how to build their own. That gap costs you when a resource leaks in production, when you're reaching for the wrong tool, or when you need to reason about cleanup under failure.

This series opens the black box from zero — starting with the resource leak problem context managers were invented to solve, then building all the way up to writing your own and spotting them across the libraries you already use.

By the end, you'll know exactly how with works under the hood.

Read the series →


Python Decorators From the Ground Up

Series in progress · Functions & Metaprogramming

Every decorator you've ever used — @app.route, @pytest.fixture, @login_required — looks like magic until you've built one yourself. That gap costs you when a decorator silently breaks your function's identity, when stacking order matters, or when you need to write one that takes arguments.

This series builds the foundation from zero — first-class functions, the wrapper pattern, and argument forwarding with *args and **kwargs — so decorators stop feeling like magic and start feeling like something you could have written yourself.

By the end, you'll know exactly how @decorator works under the hood.

Read the series →


More series coming soon.