Ned Batchelder reposted
Ned Batchelder
Ned Batchelder
@nedbat.com
Python, Boston, mathy fun, juggling, autism parenting. https://nedbat.com
4.3K followers170 following234 posts
Mailed 20 letters to voters today. Will it help? I don't know. But it might, and it's something I can actually do. Can you spare 30 minutes to help get voters to the polls in states in play? votefwd.org
Write letters to U.S. voters! It's easy. It could help. Doomscrolling won't... votefwd.org
Here'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
Write letters to new voters! The more people are involved, the better everyone will be heard. votefwd.org
Ned Batchelder reposted
Are 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.
I 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/...
This Wednesday! #Boston #Python www.meetup.com/bostonpython...
Boston 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!
Ned Batchelder reposted
Needed 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
In which the author dives very deep (far deeper than called for) into using Hypothesis to generate data for #Python tests: nedbatchelder.com/blog/202512/...
A useful class that is hard to test thoroughly, and my failed attempt to use Hypothesis to do it: nedbatchelder.com/blog/202512/...
Ned Batchelder reposted
Replying to @mathspp.com
I 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...
How 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...
"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/...
Forget 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/
Boston Python is a good place to connect with people and even have have non-technical discussions: nedbatchelder.com/blog/202510/...
Nice! 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...
Ned Batchelder reposted
TLDR; 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-... 🧵
I'm writing letters to defend democracy, how are you spending your day? votefwd.org
If you can go out to a march, you can spend an hour writing letters to encourage voters. votefwd.org
Vote Forward is running letter-writing campaigns to US voters. votefwd.org Does it help? Not sure. Doom-scrolling doesn't!
I learned a few algorithms for generative art, you can too: nedbatchelder.com/blog/202509/...
People should spend less time learning DSA, more time learning testing. nedbatchelder.com/blog/202509/...
Vote Forward is running letter-writing campaigns to US voters. votefwd.org Does it help? Not sure. Doom-scrolling doesn't!
My wife's latest for Psychology Today. That's me in the pic, about 22 years ago.. www.psychologytoday.com/us/blog/all-...
Ned Batchelder reposted
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: nedbatchelder.com/blog/202508/...
I 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 is one of those tools that's just silently awesome." news.ycombinator.com/item?id=4472...
Did you know you can write your own regexes to exclude code from coverage.py measurement? nedbatchelder.com/blog/202507/...
A 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/...
Ned Batchelder reposted
@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 🙏🏻
In #Python, why is `reversed(range(...))` different than `range(...)`? nedbatchelder.com/blog/202507/...
Are 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...
Two geometric facts about 63, but how to connect them? nedbatchelder.com/blog/202506/...
Cog 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.io
Ned Batchelder reposted
Well, 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...
There's an odd resonance when your project's issue numbers start being years that you've lived through: github.com/nedbat/cover...