The latest version of Python is “the best ever”, say devs
Speed, features, and clarity all swallowed whole in Python 3.11
When you purchase through links on our site, we may earn an affiliate commission.Here’s how it works.
The latest version of the programming language Python, 3.11 has been unveiled, with its development team claiming that the new edition might just be the best yet.
In therelease notes, Pablo Galindo Salgado, Python Steering Council member and the release manager for the current version, alongside fellow team members Steve Dower and Ned Deily, wrote the team has “put a lot of effort into making 3.11 the best version of Python possible”.
They also listed the keynote improvements in Python 3.11: “better tracebacks”, “faster Python”, “exception groups and except*”, in addition to offering various improvements to typing.
Python 3.11’s latest improvements
The Python release team claimed in the release notes that Python 3.11 “is up to 10-60 percent faster than Python 3.10”, and reported measuring 1.22x speedups on average, courtesy of theFaster CPython Project.
Though it is worth pointing out this likely only applies to pure Python code, and Python itself has never been the fastest programming language out there, that’s still impressive.
Several Python Enhancement Proposals (PEPs) promise to offer more concrete quality of life improvements.
PEP 657, for example, will introduce more detailed error reports for tracebacks - reports detailing function calls within a python script, making debugging that much more straightforward.PEP 680, meanwhile, means that Python will be able to parse TOML files, commonly used for configuration files without the need for an external library.
Are you a pro? Subscribe to our newsletter
Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
However, asThe Registerreports, PYC files compiled by the Python interpreter are now, on average, 22% larger, and while the Python team stand by the change, they have issued an opt-out, in the form of “PYTHONNODEBUGRANGES”, a new environmental variable.
PEP 654, on the other hand, allows for handling several exceptions at once with the introduction of exception groups and the new except* syntax.
Check out our list of the best laptops for programming right now>Python is about to solve one of its most frustrating issues
This ancient unpatched Python security flaw could leave thousands of projects vulnerable
Python 3.11 should also encourage developers to use data types more, thanks to some new features, and more subtle changes that give developers more control in the backend.
Perhaps the best illustration of this isPEP 675, which allows users to declare arbitrary string types, but there’s alsoPEP 673(the Self Type), an intuitive way to annotate methods that return instances of the same class. Finally,PEP 646(Variadic Generics), allowing generics to store several types at once for assignment to objects later.
Luke Hughes holds the role of Staff Writer at TechRadar Pro, producing news, features and deals content across topics ranging from computing to cloud services, cybersecurity, data privacy and business software.
Cisco issues patch to fix serious flaw allowing possible industrial systems takeover
7 myths about email security everyone should stop believing
Google TV will require more RAM for future upgrades – which might leave older TVs and streaming boxes behind