I'm over the moon that the #Python helper function I write more than _any_ other, `chunks`, is coming to the stdlib in 3.12 as `itertools.batched(iterable, n)`! It takes a long iterable and yields chucks (or batches) of length `n`.
I think I've pasted the same Stackoverflow snippet into... 10 projects at this point? So this is huge for me.
https://docs.python.org/3.12/library/itertools.html#itertools.batched
Carter’s has this shirt for kids, but I can’t find an adult version anywhere. Trying to tell Amazon or a search engine that it’s important that the shirt have all three colors (much less in a specific order) seems impossible.
@mjgardner @icing actually, being liberal in accepting things is not a good idea either. If it violates the protocol, eject, close, kill, abort. At once. That leads to better code and protocols in the longer run.
Today's my last day at Google 🥲
I'm taking some time off to focus on my family, personal health, and to work on my bots.
If anyone knows of a role that'll fit me, I'll appreciate the intro! 😊
It’s relatively easy to make a drop-in replacement for these, but also we’re deprecating them because they’re conceptually the wrong thing to do, so it’s best to migrate to using aware datetimes if possible: https://blog.ganssle.io/articles/2019/11/utcnow.html
datetime.utcnow
and datetime.utcfromtimestamp
will be deprecated in #python 3.12: https://github.com/python/cpython/issues/103857
If you maintain a package, now is probably a good time to grep your source code for utcnow
and utcfromtimestamp
to get out ahead of the deprecation warnings. 📅🕐
You should absolutely include your tests in your coverage measurement.
https://nedbatchelder.com/blog/202008/you_should_include_your_tests_in_coverage.html
Solutions needed: Is it possible for coverage.py to automatically exclude Protocols from measurement?
Should coverage.py report a missing branch if a comprehension doesn't run to completion? https://github.com/nedbat/coveragepy/issues/1617#issuecomment-1535647011
Would it be better if instead of "2->exit" it said "completion(2)" ?
“Oh I need to communicate with someone on Discord quickly, guess I’ll launch it. Oh, there’s an update available, so Discord prevents me from opening their appliaction.”
Reason #215 to avoid #discord.
Just released Typer 0.8.0 🔖
With support for ✨ custom param types ✨
Thanks to John Purviance for the work in the PyCon sprint! 🍰
https://typer.tiangolo.com/tutorial/parameter-types/custom-types/
Programmer working at Google. Python core developer and general FOSS contributor. I also post some parenting content.