Wow this is much needed. Thanks!
I keep hearing rumors that a no GIL version is coming, I think this is probably the biggest change so far, as it would make the language much more performance oriented. I'm considering a tech stack and thinking about both python and Mojo for ML, not sure that Mojo is stable yet, but the performance differences are HUGE.
Interesting list. I need none of it except the guaranteed dict insertion order!<p>But of course, I have to learn all of it to understand other people's code. Python's syntax has really gotten worse. The match statement is ugly in comparison to functional languages, I'm not sure about f-strings, the with-statement extension adds new overhead to the reader.<p>Python is really like C++ now, except 50 times slower (yes, I know about the slow std::unordered_map special case that is due to its rigid specification).
As someone who haven't been using Python extensively since college, and mostly use TypeScript and Kotlin at work (and little bit of Rust for hobby projects), that's a lot of typing features. It feels like for the past few years typing been getting more attention. Good to see.<p>I used to hate TypeScript (circa 2016) because it kept bugging me with typing errors, and I used to sprinkle "any" to shut it up.
<a href="https://nedbatchelder.com/text/which-py.html" rel="nofollow">https://nedbatchelder.com/text/which-py.html</a><p>Ned’s list is what I usually use.
In this snippet<p>```python
if header.startswith("X-Forwarded-"):
section = header.removeprefix("X-Forwarded-")
```<p>the `startswith()` check is unnecessary. If `header` doesn't start with "X-Forwarded-" then `header.removeprefix("X-Forwarded-")` just returns `header`.<p>Nice summary doc, with good examples. You can also visit [this site of mine](<a href="https://ptmcg.pythonanywhere.com/python_nutshell_app_a_search" rel="nofollow">https://ptmcg.pythonanywhere.com/python_nutshell_app_a_searc...</a>) to search for changes by version (3.7-3.11).
It was nice to see the "annotations" from 3.7 for helping avoid types with circular imports (for types). I didn't know that!<p>I'd love to see a step further, and avoid the circular import problem entirely. It's something I fight with everything time I work in Python. I find that I am forced to structure my Python programs in a way specifically designed to avoid this instead of what makes sense for organization. Or I will C+P functions if I feel that tradeoff is not worth it.
This is great. Python is my main language and I learned a lot.<p>The piping and typing changes are so useful ! Bookmarked and I'll be coming back to this often.<p>I also caught the sleep token references. Well done .
It's incredible to see how much stuff has been added over the last couple of years.<p>I've missed a lot of these that I'm going to take advantage of!