Plurrrr

Sun 28 Nov 2021

Late-bound argument defaults for Python

Python supports default values for arguments to functions, but those defaults are evaluated at function-definition time. A proposal to add defaults that are evaluated when the function is called has been discussed at some length on the python-ideas mailing list. The idea came about, in part, due to yet another resurrection of the proposal for None-aware operators in Python. Late-bound defaults would help with one use case for those operators, but there are other, stronger reasons to consider their addition to the language.

Source: Late-bound argument defaults for Python, an article by Jake Edge.

Calling Rust from Python using PyO3

Calling Rust code from Python is made easy by PyO3. You can write a Rust library and rely on the combination of PyO3 and maturin, a supporting tool from the PyO3 ecosystem, to compile the Rust library and have it installed directly as a Python module. Among others, PyO3 can translate types between Python and Rust as well as make it easy to export Rust functions to Python through a set of macros.

Source: Calling Rust from Python using PyO3, an article by Said van de Klundert.

Explainer: .DS_Store files

Inside pretty well every folder that you’ve ever opened is a hidden file, one which even showing hidden files doesn’t reveal: .DS_Store. As with other under-the-hood features which Apple really doesn’t want you to know about, you’ll only come across it when it causes trouble.

Source: Explainer: .DS_Store files, an article by Howard Oakley.