I recently put some effort into creating better-functools. It's a package that adds some tooling for functional programming in Python. And allows...| blog.changs.co.uk
This one has frustrated me for a while. It starts off with a REST API route. For example in fastAPI @app.get(| blog.changs.co.uk
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...| blog.changs.co.uk
Introduction I wrote about free-threading recently in How free are threads in Python now?. Where I found some unexpected difficulties...| blog.changs.co.uk
Free-threaded Python (PEP-703) was released in October 2024. It enables true multi-threaded execution without the restriction of the GIL. I...| blog.changs.co.uk
better-functools: Python functional fun| blog.changs.co.uk
better-functools: Python functional fun| blog.changs.co.uk
I've been doing advent of code again this year. There are two Python features I always rely on, iterators and pattern matching. Iterators allow...| blog.changs.co.uk
I've been experimenting with Langchain for GPT based queries. One problem we often encounter with GPT is hallucinations. This makes certain...| blog.changs.co.uk
I've worked with SQLAlchemy for a while now, and in my opinion it's the best ORM in Python. It's feature rich with strong support for all major...| blog.changs.co.uk
TypedDict was introduced in PEP-589 which landed in Python 3.8. The primary use case was to create type annotations for dictionaries. For example,...| blog.changs.co.uk
PEP 484 defines the type Dict[K, V] for uniform dictionaries, where each value has the same type, and arbitrary key values are supported. It doesn’t properly support the common pattern where the type of a dictionary value depends on the string value of...| Python Enhancement Proposals (PEPs)
CPython’s global interpreter lock (“GIL”) prevents multiple threads from executing Python code at the same time. The GIL is an obstacle to using multi-core CPUs from Python efficiently. This PEP proposes adding a build configuration (--disable-gil) to...| Python Enhancement Proposals (PEPs)