Python 3.11 features discussion thread :thread: fo...
# random
a
Python 3.11 features discussion thread ๐Ÿงต for those interested ๐Ÿ™‚
And, of course, a little speedup is nice too:
CPython 3.11 is on average 25% faster than CPython 3.10 when measured with the pyperformance benchmark suite, and compiled with GCC on Ubuntu Linux. Depending on your workload, the speedup could be up to 10-60% faster.
https://docs.python.org/3.11/whatsnew/3.11.html#faster-cpython
There are several times I wish I had a
Self
type: https://peps.python.org/pep-0673/
w
I think the speedup is the most impactful feature for Meltano and our other open-source Python projects. We can't use many of the new features yet because we still support Python 3.7, but we don't have to do anything to get the benefits of the performance improvements. It's free.
I've opened an issue for Python 3.11 support: https://github.com/meltano/meltano/issues/6922
a
Thanks, @Will Da Silva (Arch)!
Agreed. Speedup is probably the most impactful for Meltano itself in the long run. I think the above are all the new features that I'm personally interested in... I honestly did have a negative reaction to reading about Exception Groups and
except*
. Seems like a lot of added complexity for the relative benefit, but as I learn more and see it in the wild, perhaps I'll come around. thinkspin
w
I'm tentatively excited for exception groups personally. I've had many occasions where I'm doing parallel/concurrent processing (threads, subprocesses, sub-interpreters, no-GIL C code, asyncio, etc.) and there's a possibility (or even an expectation) that multiple exceptions are raised and need to be handled together. My approaches to these issues have always felt half-baked, and so there being a standard way to handle these cases now seems nice.
Python's (deserved) popularity as a glue language has made it such that it has to handle (or at least many people want it to handle) a very wide breadth of use-cases it was never originally designed to handle. Some of the solutions are kinda clunky, but still better than no solution.
e
Iโ€™m still waiting for a chance to use
match...case
in a 3.10+ project ๐Ÿ˜