Though I will admit that there are also NO OTHER REASONS for putting lazy imports in a context manager. It's just the backwards compatibility use case and no others.
I further contend that other than `contextlib.suppress`, there is no other situation where lazy imports in a context manager could be dangerous.
*Ahem* I hereby affirmatively state that the ONLY ergonomic way to functionally backport lazy imports would be to use a context manager. Even a *genius* could not come up with a better way.
I think I should have used Cunningham's law instead of asking questions in [this post](https://discuss.python.org/t/pep-810-explicit-lazy-imports/104131/176). I suspect I would have gotten more people weighing in.
Let me post a *non*-subtoot for once... We made a thing!
https://discuss.python.org/t/pep-810-explicit-lazy-imports/104131
At least I'm teaching my children the valuable lesson that watching sports is boring and unpleasant.
First time going to a baseball game since I was a child and I am impressed with the degree to which every aspect of this is mild to moderately unpleasant, starting with the fact that in order to access the tickets it was *required* to download the "MLB Ballpark" app (which is apparently different from the "MLB" app).
As promised, what I've been doing in 2025 part 2. Announcing FinFam: https://sedimental.org/announcing_finfam.html
My credit card when I buy gas on a highway near my house: "Seems pretty sus... 🤨"
My credit card when I order zero calorie sauces from Spain, delivered to someone else in the Netherlands, with that person's name as the cardholder: "All good bro, enjoy your sauces! 👍"
I can't tell if their fraud detection are not that good or if they just know me really well 😛
Do you dislike drafting long text messages on a mobile keyboard? Me too!
I created a little tool that lets you write text messages from a computer and then send them from your phone by scanning a QR code:
https://sethmlarson.dev/draft-sms-and-imessage-from-any-computer-keyboard
#blind I want to make the CLI app tools I use blind accessible. Did I correctly read that the better way is to create a local mini-website? (because the accessibility tools for browsers are so much better than for anything else?)
Or is a CLI tool automatically blind accessible because it is all text already?
Today we got our dishwasher fixed under warranty. To diagnose it, the tech stuck a photosensor+magnet onto the front panel over the green status LED and started reading diagnostics. It turns out the status LED is actually a serial port*, and it's continually transmitting status.
I can think of so many gadgets that could and should use this trick...
*It's probably something other than regular serial -- a UART's TX would flicker. I don't know any details.
The pytest.mark.parametrize feature is amazing, and more people should use it, especially people new to writing #Python tests. But it looks scary. I wrote an explainer: https://nedbatchelder.com/blog/202508/starting_with_pytests_parametrize.html
Interested in helping out with one of the most innovative, grassroots, publishing efforts around? The Journal of Open Source Software (@joss) is looking for editors: https://blog.joss.theoj.org/2025/08/call-for-editors
We conduct collaborative checklist-based peer review of research software using GitHub issues.
JOSS is a positive, rewarding, community-based reviewing/editing effort. I'm happy to answer questions if anyone is interested.
Did you know: You can build iOS and Android Python wheels with cibuildwheel, and upload them to PyPI? You can! But not many projects have.
Want to know if your popular package offers iOS or Android support? Here's a leaderboard. Want a great way to contribute? Submit a PR adding iOS and Android support to your favourite package.
Programmer working at Google. Python core developer and general FOSS contributor. I also post some parenting content.