mathspp blog

416 448,247 37,257
articles words lines of code

Today I learned how to use \b and \B to match prefixes and suffixes with regex.

Today I learned that you can dynamically change the type of an object in Python.

Today I learned about a Python Easter Egg hidden in the hash of two special float values.

Answer this quiz to test your knowledge about the Python language, community, andd the 2025 edition of EuroPython!

Today I learned you can embed images in your module docstrings and they'll be rendered in the tooltips inside your IDE.

This article shows how I have used regex in real life for all sorts of tasks.

In this article I share my personal highlights of PyCon Italy 2025, including stories and anecdotes.

Answer this quiz to test your knowledge about the Python language, community, andd the 2025 edition of PyCon Italy!

Dip your toes in metaprogramming and learn about __init__'s big brother, the dunder method __new__.

Play this short Python quiz to test your Python knowledge!

Today I learned how to set different thousands separators using string formatting.

In this article I share my personal highlights of the 2025 edition of the PyCon US conference,.

This article shows the small script I use to automatically push code changes while live coding in talks or classes, improved with uv.

Today I learned that the module builtins grows dynamically in the REPL.

Today I learned you can use uv to install CLI tools with extra dependencies.

This article gives an overview of the tools available in the module enum and how to use them.

Today I learned how to use uv to escape uv and go back to using venv and pip for a given project.

Today I learned how to detect collisions between circles and rectangles with 100% accuracy.

This article proposes an implementation of an ergonomic binary search algorithm implemented as a bidirectional generator.

This tutorial walks you through implementing a 2D scrolling game in JavaScript.