Other articles


  1. t-strings: the good and the ugly

    This one's hot off the press as the first beta for Python 3.14 (aka. π-thon) has hit. We're looking at a chunky release with a lot of new features. But all I can think about are these new template strings (officially t-strings).

    PEP-750 officially introduces the concept. The idea …

    read more
  2. Why you should write your tools in Python Again

    You're probably thinking that there are already plenty of tools written in Python.

    But I see that most of the popular tools like mypy and flake8 are built for development environments. In contrast, general purpose cli tools tend to be built in other languages, for example most of the docker …

    read more
  3. Sqlalchemy Footgun: Discarding the statement

    This one has frustrated me for a while.

    It starts off with a REST API route. For example in fastAPI

    @app.get("/")
    def search_users(session: Session) -> list[User]:
        """Finds users optionally filter by user_id"""
        statement = select(User).order_by(User.name)
        return session.execute(statement).scalars().all()
    

    Then we get asked …

    read more
  4. Jamie's Pattern Matching Cookbook

    Structural pattern matching is probably the coolest new syntax introduced to Python. Added in 3.10, it's been a few years now and more people are writing apps in 3.10* than any other version now.

    Though even with the wide adoption of 3.10 and more people being exposed …

    read more

social