Ned Batchelder @nedbat.com · 27/09/2026Here's a simple way to help U.S. political candidates: Oath analyzes races, crunches the data to find where money will do the most good, and distributes funds. Choose your cause, and direct money to where it has the best chance to make a difference. app.oath.vote 011
Ned Batchelder @nedbat.com · 02/05/2026Write letters to new voters! The more people are involved, the better everyone will be heard. votefwd.orgvotefwd.orgVote ForwardVote Forward volunteers send heartfelt handwritten letters to unregistered and low-propensity voters encouraging them to participate in our democracy. The letters have been shown to significantly boos... 041
Reposted by Ned BatchelderPython Software Foundation @python.org · 14/04/2026Are you going to #PyConUS? Have you booked in our hotel block? New on the blog, some hard numbers & why we’re in a tight spot. We only have until April 24th to turn the tide, so please read, share, and book your PyCon US stay in the official block today.pyfound.blogspot.comPython Software Foundation News 32224
Ned Batchelder @nedbat.com · 09/02/2026I got tired of hacking ad-hoc text selection functions, so I wrote edtext: line selection and manipulation using ed address ranges. nedbatchelder.com/blog/202602/...nedbatchelder.comEdTextedtext is a utility inspired by the ed editor for selecting and manipulating lines of text. 020
Ned Batchelder @nedbat.com · 17/01/2026This Wednesday! #Boston #Python www.meetup.com/bostonpython...meetup.comResponsible Pytest Usage, Wed, Jan 21, 2026, 6:00 PM | MeetupA presentation sponsored by Matterbeam David Sturgis: Responsible Pytest Usage PyTest is an increasingly popular framework for automated software testing in Python. In so 141
Ned Batchelder @nedbat.com · 14/01/2026Boston Python presentation night in one week: Responsible Pytest Usage by David Sturgis, sponsored by Matterbeam. www.meetup.com/bostonpython... Join us if you are in the area!meetup.comResponsible Pytest Usage, Wed, Jan 21, 2026, 6:00 PM | MeetupA presentation sponsored by Matterbeam David Sturgis: Responsible Pytest Usage PyTest is an increasingly popular framework for automated testing in Python. In some ways, 041
Reposted by Ned BatchelderBrady @DataCastworks @datacastworks.bsky.social · 30/12/2025Needed to clean code after my first major rewrite. 'Coverage.py' is awesome, showed exactly what isn't getting called. I silently broke something on the path to email alerts for the error logger. Oops... @nedbat.com #python #coding 051
Ned Batchelder @nedbat.com · 21/12/2025In which the author dives very deep (far deeper than called for) into using Hypothesis to generate data for #Python tests: nedbatchelder.com/blog/202512/...nedbatchelder.comGenerating data shapes with HypothesisI used Hypothesis to generate random data structure schemas, and then generate random data using them. I learned a lot along the way. 070
Ned Batchelder @nedbat.com · 18/12/2025A useful class that is hard to test thoroughly, and my failed attempt to use Hypothesis to do it: nedbatchelder.com/blog/202512/...nedbatchelder.comA testing conundrumA useful class that is hard to test thoroughly, and my failed attempt to use Hypothesis to do it. 070
Reposted by Ned BatchelderRodrigo Girão Serrão 🐍🚀 @mathspp.com · 11/12/2025I learned this 1+ year ago from @nedbat.com and had to use it yesterday with the code shown above. I was so annoyed by my code on the left and SUDDENLY I remembered Ned's trick and voilà, my code became so much nicer... 092
Ned Batchelder @nedbat.com · 18/11/2025How much is your company spending to support the Python Software Foundation? For comparison, how much do they spend for tips on expensed meals? The PSF runs PyPI, where pip installs from. You depend on PyPI. Fund the PSF. Tip your server! www.python.org/psf/sponsors...python.orgSponsor the PSFThe official home of the Python Programming Language 13320
Ned Batchelder @nedbat.com · 18/11/2025"If you have someone in your life on the spectrum, or are on it yourself, I guarantee you will find new ways to understand the breadth of what autism means and what it can be." nedbatchelder.com/blog/202511/...nedbatchelder.comAutism Adulthood, 3rd editionMy wife’s book is out today, you should buy it. 050
Ned Batchelder @nedbat.com · 05/11/2025Forget about supporting the PSF, too abstract. Pip installs from PyPI. It would be bad if `pip install` stopped working. Support the org that runs PyPI. Surprise, it's the PSF! Your company depends on #Python. You want it to keep working and keep being good. python.org/psf/sponsors/python.orgPython Software Foundation SponsorsThe official home of the Python Programming Language 04520
Ned Batchelder @nedbat.com · 30/10/2025Boston Python is a good place to connect with people and even have have non-technical discussions: nedbatchelder.com/blog/202510/...nedbatchelder.comSide project adviceA chat about side projects from a Boston Python project night: choose your paths and forgive yourself. 071
Ned Batchelder @nedbat.com · 29/10/2025Nice! My coverage dropped from 94.370% to 94.366%! (I deleted code that had been covered, but was no longer needed) github.com/nedbat/cover... github.com/nedbat/cover...github.comtest: no longer need to support multiple 'lines' · nedbat/coveragepy@f8f3edcSince 3.10 is our minimum, and it conforms to PEP 626, we know what lines will be reported, and don't need multiple options. 080
Reposted by Ned BatchelderPython Software Foundation @python.org · 27/10/2025TLDR; The PSF has made the decision to put our community and our shared diversity, equity, and inclusion values ahead of seeking $1.5M in new revenue. Please read and share. pyfound.blogspot.com/2025/10/NSF-... 🧵python.orgThe official home of the Python Programming Language 12363792728
Ned Batchelder @nedbat.com · 25/10/2025I'm writing letters to defend democracy, how are you spending your day? votefwd.org 1120
Ned Batchelder @nedbat.com · 22/10/2025If you can go out to a march, you can spend an hour writing letters to encourage voters. votefwd.orgvotefwd.orgVote ForwardVote Forward volunteers send heartfelt handwritten letters to unregistered and low-propensity voters encouraging them to participate in our democracy. The letters have been shown to significantly boos... 041
Ned Batchelder @nedbat.com · 14/10/2025Vote Forward is running letter-writing campaigns to US voters. votefwd.org Does it help? Not sure. Doom-scrolling doesn't!votefwd.orgVote ForwardVote Forward volunteers send heartfelt handwritten letters to unregistered and low-propensity voters encouraging them to participate in our democracy. The letters have been shown to significantly boos... 020
Ned Batchelder @nedbat.com · 26/09/2025I learned a few algorithms for generative art, you can too: nedbatchelder.com/blog/202509/...nedbatchelder.comHobby Hilbert SimplexAn exploration and explanation of how to generate interesting swoopy art 081
Ned Batchelder @nedbat.com · 22/09/2025People should spend less time learning DSA, more time learning testing. nedbatchelder.com/blog/202509/...nedbatchelder.comTesting is better than DSAPeople should spend less time learning DSA, more time learning testing. 194
Ned Batchelder @nedbat.com · 19/09/2025Vote Forward is running letter-writing campaigns to US voters. votefwd.org Does it help? Not sure. Doom-scrolling doesn't!votefwd.orgVote ForwardVote Forward volunteers send heartfelt handwritten letters to unregistered and low-propensity voters encouraging them to participate in our democracy. The letters have been shown to significantly boos... 000
Ned Batchelder @nedbat.com · 25/08/2025My wife's latest for Psychology Today. That's me in the pic, about 22 years ago.. www.psychologytoday.com/us/blog/all-...psychologytoday.comA Lifetime of Autism and Summer VacationsPersonal Perspective: As empty-nesters, we can go anywhere, do anything. But in the summer, we don't. We go to that same rental, even though it is way too big for just the two of us. 061
Ned Batchelder @nedbat.com · 19/08/2025Thanks to an amazing contribution by Alex Gaynor, `coverage combine` is now twice as fast! Not released yet, but give it a try and report back. python3 -m pip install git+https://github.com/nedbat/coveragepy 0101
Reposted by Ned BatchelderMike Fiedler @miketheman.com · 13/08/2025Love it! And stacking parametrize for combinations is cool, too! 071
Ned Batchelder @nedbat.com · 13/08/2025The 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: nedbatchelder.com/blog/202508/...nedbatchelder.comStarting with pytest’s parametrizePytest’s parametrize feature is powerful but it looks scary. I hope this step-by-step explanation helps people use it more. 1163
Ned Batchelder @nedbat.com · 11/08/2025I fixed a handful of issues with the new `patch = subprocess` feature in coverage․py. Try 7.10.3 and let me know how it goes! coverage.readthedocs.io/en/7.10.3/ch...coverage.readthedocs.ioChange history for coverage.py — Coverage.py 7.10.3 documentation 060
Ned Batchelder @nedbat.com · 07/08/2025Every puzzle contains another puzzle: how was it constructed? The game Flow Free asks you to find the paths to connect same-colored dots on a grid. How are these layouts created? 261
Ned Batchelder @nedbat.com · 31/07/2025You are a treasure, and I hope you have someone who treasures you. 2265
Ned Batchelder @nedbat.com · 29/07/2025"Coverage is one of those tools that's just silently awesome." news.ycombinator.com/item?id=4472...news.ycombinator.comCoverage.py Regex Pragmas | Hacker News 0110
Ned Batchelder @nedbat.com · 29/07/2025Did you know you can write your own regexes to exclude code from coverage.py measurement? nedbatchelder.com/blog/202507/...coverage.py 143
Ned Batchelder @nedbat.com · 25/07/2025A few more words about the new `patch` option in coverage․py 7.10: "The latest release of Coverage feels like a Christmas present!" nedbatchelder.com/blog/202507/...nedbatchelder.comCoverage 7.10.0: patchCoverage 7.10 has some significant new features that have solved some long-standing problems. 050
Reposted by Ned Batchelderleodevian.bsky.social @leodevian.bsky.social · 24/07/2025@nedbat.com The latest release of Coverage feels like a Christmas present! The native support for Python subprocesses is so good! Thank you for all of it 🙏🏻 142
Ned Batchelder @nedbat.com · 15/07/2025In #Python, why is `reversed(range(...))` different than `range(...)`? nedbatchelder.com/blog/202507/...nedbatchelder.com2048: iterators and iterablesMaking a simple game, I waded into a classic iterator/iterable confusion. 070
Ned Batchelder @nedbat.com · 30/06/2025What's the best way these days to get nightly builds of #Python versions? I have deadsnakes in the coverage․py nightly action, but some of the builds are over two weeks old and I don't know why. Would pyenv be better? uv? Anyone have an example working well for me to copy^H^H^H^H be inspired by? 010
Ned Batchelder @nedbat.com · 17/06/2025Are you in Boston and want to hang with #Python people? Boston Python's project & collaboration night is June 24th. It's an informal gathering to talk together, work together, learn from each other, network, whatever. Tell your friends :) www.meetup.com/bostonpython...meetup.comProject & Collaboration Night, Tue, Jun 24, 2025, 6:00 PM | MeetupBring a laptop. Bring ideas. Bring questions. Bring enthusiasm. Bring friends. The Boston Python Project & Collaboration Night is a time to find others with compatible inte 095
Ned Batchelder @nedbat.com · 16/06/2025Two geometric facts about 63, but how to connect them? nedbatchelder.com/blog/202506/...nedbatchelder.comMath factoid of the day: 63Two geometric facts about 63, but how to connect them? 293
Ned Batchelder @nedbat.com · 10/06/2025Cog 3.5! --check now has --diff to see what changed shorter checksum format to be less distracting current directory restoration to simplify your code and, shocker! --help works! cog.readthedocs.iocog.readthedocs.ioCog — cog 3.5.1 documentation 030
Ned Batchelder @nedbat.com · 09/06/202539 years ago today.... nedbatchelder.com/blog/202506/...nedbatchelder.comDigital Equipment Corporation no moreTech giants come and go 0192
Ned Batchelder @nedbat.com · 06/06/2025Every June I dig this up: hachyderm.io/@nedbat/1105...hachyderm.ioNed Batchelder (@nedbat@hachyderm.io)Attached: 1 image Do you have interns at work this summer? They may find this helpful (created by a summer intern at edX a few years ago): 0184
Reposted by Ned Batcheldercait (and adonis) @cait.bsky.social · 05/06/2025a friend of mine shared this ai-generated "emotion wheel" and unfortunately i have been laughing my ass off at it for like 15 minutes now. today i am feeling Fnliinneon 23951501321
Ned Batchelder @nedbat.com · 05/06/2025Good news: the site is back, though I still have questions about what happened... 020
Ned Batchelder @nedbat.com · 05/06/2025Well, I *used* to have a web site! Digital Ocean "upgraded" my server three days ago, and nedbatchelder.com hasn't worked since. They say they are working on it...nedbatchelder.com 040
Ned Batchelder @nedbat.com · 31/05/2025Hmm, in CI, the "tests" action works, but the "coverage" action fails, and nothing has changed. Debugging it, I'm going to learn something. >> I learn something new every day, no matter how hard I try. 070
Ned Batchelder @nedbat.com · 30/05/2025Intriguing: css-doodle.comcss-doodle.com<css-doodle />A web component for drawing patterns with CSS 030
Ned Batchelder @nedbat.com · 28/05/2025There's an odd resonance when your project's issue numbers start being years that you've lived through: github.com/nedbat/cover...github.comPrevent module reinitialisation with multi-phase init by AA-Turner · Pull Request #1978 · nedbat/coveragepycc @nedbat xref: 80e977c Use multi-phase initialisation (PEP 489) #1977 Changes written by a human ;-) The ctracer module still uses static types (e.g. CTracerType), so is not isolated and may ha... 060
Ned Batchelder @nedbat.com · 28/05/2025As a tool author, it's hard to keep up with all the changes to keep my code up-to-date. Sometimes a polite reminder is all it takes: github.com/nedbat/cover... Also, Claude made the code changes, and did a good job!github.comUse multi-phase initialisation (PEP 489) · Issue #1977 · nedbat/coveragepyHello, Please consider adopting multi-phase init for your Python extension modules. In short, multi-phase makes extension modules behave more like pure-Python modules and means that the import syst... 130
Ned Batchelder @nedbat.com · 20/05/2025How desperate is my current "machete mode" debugging? I put "except: pass" on one line instead of two! nedbatchelder.com/text/machete...nedbatchelder.comMachete-mode DebuggingHow to debug thorny Python problems, using Python’s dynamic nature to extract information in unusual ways. 190
Ned Batchelder @nedbat.com · 17/05/2025Want more play at #PyConUS? Join us at the juggling open-space at 3:45 Saturday outside the 3rd floor rooms. It's not sky-diving, but it's still great! We'll teach you! 060