📡 Python radar - October/November 2024
A personal selection of Python-related news and projects that caught my attention this month (note: leading emojis are mine).
📦 uv IS the Future of Python Packaging! 🐍📦 (youtube.com)
We’ve heard a lot about the new tool “uv” lately, and here’s a video that explains well why!
🔬 Numpy QuadDType: Quadruple Precision for Everyone (quansight.org)
The author presents a new Numpy type for quadruple precision that addresses the limitations of the "longdouble" type, with two example usages at the end.
🦆 DuckDB in Python in the Browser with Pyodide, PyScript, and JupyterLite (duckdb.org)
There’s a lot of interesting stuff in this one article! First, PyScript and JupyterLite allow you to work in a Python environment right from your browser without needing to install anything. Then, DuckDB can be summed up as “SQLite in super fast columnar mode”; I admit that’s a bit of a rough description but it should resonate with those familiar with SQLite and databases.
📁 init.py files are optional. Here’s why you should still use them (dev.arie.bovenberg.net)
If, like me, you always wonder why we carry these empty __init__.py
files in all packages, here’s a bit of an answer.
⚙️ Should you use uv’s managed Python in production? (pythonspeed.com)
A very interesting feature of uv is its ability to quickly and locally install a so-called "standalone" Python distribution; this article raises the question of whether this Python distribution can be used in production. Ultimately, beyond the answer, the most interesting part here is understanding what makes a Python distribution "production-ready."
🧩 Structural Pattern Matching in Python (realpython.com)
A tutorial from Real Python on a mechanism that appeared with Python 3.10, known somewhat harshly as "structural pattern matching", which is nothing more than match/case syntax with quite advanced possibilities to specify "cases" to "match" (apologies for the anglicism); in certain situations this can greatly simplify your code while remaining readable.
🧪 My NumPy Year: Creating a DType for the Next Generation of Scientific Computing (quansight.com)
The second article this month regarding the design of a new Numpy dtype, this time the dtype that appeared with version 2.0 to more efficiently manage variable-length strings.
⏳ Make It Ephemeral: Software Should Decay and Lose Data (lucumr.pocoo.org)
An interesting reflection by Armin Ronacher (who has been mentioned here before, author of Flask, Click, Rye, etc) urging developers to more explicitly plan for the obsolescence of data generated and stored in applications.
🔥 Niels Cautaerts - Python dependency management is a dumpster fire (nielscautaerts.xyz)
An (yet another) article on Python dependency management but with the merit of providing a fairly comprehensive, detailed, and up-to-date recap (things are moving quickly right now) of the different existing tools.
🔁 Loop targets (nedbatchelder.com)
While the title might not be very clear, this very short article sheds light on the fact that a for-loop is nothing more than the "repetition of an assignment" to the loop variable, which can ultimately be anything like a new entry in a dict, see the example. A bit bewildering at first read, is this really Pythonic?