Have you tried the Microsoft NERD center?
Have you tried the Microsoft NERD center?
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/...
We can agree to disagree :)
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!
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/...
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...
Did you get more from him about why that seemed absurd to him?
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...
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-...
π§΅
A stack of stamped envelopes, ready for mailing
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-...
Thanks 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
Love it! And stacking parametrize for combinations is cool, too!
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...
A hexagonal grid with tightly-packed paths connecting same-colored dots.
Every 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?
You are a treasure, and I hope you have someone who treasures you.
"Coverage is one of those tools that's just silently awesome."
news.ycombinator.com/item?id=4472...