Show more

@eric In my experience they aren’t super fun for patients, either.

@alex Yes, prior to 3.11, we were only accepting formats that could be generated from datetime.isoformat. In 3.11, we added the ability to parse most valid ISO 8601 formats, including many that are acceptable only “by agreement”.

I don’t recall if we had a principled reason for choosing truncation rather than rounding.

In Python 3.11+ datetime.datetime.fromisoformat( accepts any number of decimal places in the seconds component, extra digits are truncated (not rounded)

>>> datetime.datetime.fromisoformat('2011-11-04T00:05:23.1234567Z')
datetime.datetime(2011, 11, 4, 0, 5, 23, 123456, tzinfo=datetime.timezone.utc)

gist.github.com/moreati/85de3f #TIL #Python

Quick #Python packaging tip: if you ever find yourself wanting to type `import src.anything` or `from src import anything`, turn back. `src` should never be part of an import.

@JasonMilletary I don’t have a great sense of how easy it is to get around over there. Looks like a 20 minute walk, which doesn’t sound too bad.

Do you know if Pittsburgh has those scooters or some other casual non-car way of getting around that could make that any faster?

Now I just need to figure out why my server computer freezes up whenever I turn off the monitor it’s connected to and I’ll be a happy man. 😅

Show thread

For the past few years, my computers have failed to wake up the large 4k monitor connected to my dock, which has been a source of great annoyance to me.

Just a few days ago I came across something that suggested maybe the issue was that the monitor needs HDMI 2.0+, so I bought a newer HDMI cable and now it works perfectly, so if you are having a similar problem, might be a good idea to try a newer cable.

Anyone know if there is a gym in that is reasonably close to the convention center that will sell me a short term membership while I’m at PyCon?

A cable machine, dumbbells and an elliptical is enough to do my whole workout.

I recently optimised .startswith() and .endswith() to be more than 4x faster than before. Before, a bulky slice-and-comparison operation (s[:n] == other) would be faster; now the idiomatic variant is faster. Keep on writing idiomatic code!

- PR: github.com/python/cpython/pull

@jyrgenn @invalidname RFC-3339 only supports “absolute times”, where you know the exact offset from UTC. This is not sufficient to represent many times in the future, e.g. “2025-03-24 at 13:00 in New York time”, whose relationship to UTC is not fixed, but is semantically the right representation for a meeting scheduled in local time. It is also insufficient to represent more abstract times, or times that take place at a specific time in local time, whatever that is (e.g. “New Year’s Eve”).

@invalidname FWIW ISO-8601 is a very broad, proprietary (!!!) spec. Almost no one implements the whole thing and no one has agreed on a specific subset to use instead (RFC 3339 is too strict for most applications).

The best thing about it is that people think it means something that it doesn’t, and it gets them to mostly use YYYY-MM-DD 😛

@jerub For you, too? Weird.

I’m just glad it’s actually finally Friday.

@mariatta I don’t know much about aquaculture, but if you need to add density maybe you can drill a hole in the bottom and fill it with BBs (or coins, or something else suitably dense) and epoxy?

Python 3.13 time.time() on Windows now has a resolution of *238 ns* instead of *15.6 ms*: it's 65 500x more accurate! The feature was requested 11 years ago (2013)! Better late than never 😉 github.com/python/cpython/pull

Extremely excited to share my team at NVIDIA is hiring for a full time role working on ✨ open source Python packaging projects ✨ like Warehouse, pip, and more!

If you are or know someone excited about open source Python development, especially focusing on open source packaging projects, please take a look! And if you have any questions for me, please reach out.

Please boost for spread!

nvidia.wd5.myworkdayjobs.com/e

#python #opensource #getfedihired #fedijobs

When you say #PiDay, I hear #PyDay. Let's celebrate this day with a special episode with a special guest: sitting Steering Council member and #Python core developer, Emily Morehouse-Valcarcel!

We're talking about the Steering Council, progress bars, least and most favorite parts of Python, and of course, assignment expressions.

I'd use a walrus emoji, but the best we've got is a tuskless seal! 🦭 There's no anonymous crow either...

podcasters.spotify.com/pod/sho

@nedbat @cnx Ned is trying to start a blue dress / gold dress war on Mastodon 😛

@simon I think you dropped a Z from the format string (or, equivalently, included an extra one in the output).

Show more
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.