Hacker News new | past | comments | ask | show | jobs | submit login
Python 3.11.5 (2023) (python.org)
36 points by gjvc 8 months ago | hide | past | favorite | 14 comments



Note to the time traveler posting about an archaic version of python: it is currently 2023 as far as this site is concerned so there is no need to label the title with the year of the linked post.


no, it's to prevent recency trolls. sadly, it didn't work.


“Recency trolls”? What are they?


hehe, at the bottom of the release notes:

>>> And now for something completely different In physics, Larmor precession (named after Joseph Larmor) is the precession of the magnetic moment of an object about an external magnetic field. The phenomenon is conceptually similar to the precession of a tilted classical gyroscope in an external torque-exerting gravitational field. Objects with a magnetic moment also have angular momentum and effective internal electric current proportional to their angular momentum; these include electrons, protons, other fermions, many atomic and nuclear systems, as well as classical macroscopic systems.


All Python release notes have a "something completely different" section.


TIL! I like it.


I don’t understand the point of exception groups


Threaded or asynchronous tasks can have multiple exceptions result from a single source event, think 2/5 tasks having a problem. Currently there’s a few library specific ways to handle this and the Python team want to standardise.


What’s wrong with the `except (Exception, OtherException):` syntax


The exception groups wrap multiple tasks. Each task can throw one exception. The group is capable of catching all of them. Before with asyncio, it would exit on first exception.

You're example is: "catch the first exception of either type (A,B)", exception groups are: "catch all exceptions, of either type (A,B)"


if a user uploads a graph of information, it could validate parts of the edge conditions and return all the incorrect edges to be resolved. previously you'd have to return an errors list around you kept appending during processing.


Is it just me or is Python gathering pace again after a bit of a lull the last year or two?


Why are you noticing a difference?

It's one of the most popular N languages in the world for some small value of N, and it's been that way for a long time. The only really big piece of news is the "Shannon plan" but that was 3 years ago.

In terms of the language itself not much has changed, the match statement is the only standout.


I've been very happy with 3.9 - 3.11. Good quality of life updates, and good performance increases.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: