Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 22891

Real Python: Python News: What's New From November 2022

$
0
0

The Python world never stops spinning! After the release of Python 3.11 in October, the Python release team is already launching the first alpha versions of Python 3.12. The excitement of trying shiny new things shouldn’t distract you from being cautious while coding, though. Recently, researchers found more malicious packages on PyPI, and lawyers raised concerns about license violations when using GitHub Copilot to generate code.

Let’s dive into the biggest Python news from the past month!

Join Now:Click here to join the Real Python Newsletter and you'll never miss another Python tutorial, course update, or post.

Python 3.12 Alpha Released

One of the most newsworthy events from October was the release of Python 3.11. While many of us are exploring the cool new features of Python 3.11, others are already hard at work on the next release.

Right on track with the Python 3.12 release schedule, the Python release team unveiled Python 3.12 alpha 2 in the middle of November. The core team is still early in the development cycle, but so far, the list of new features seems exciting.

Here’s some of what’s coming in Python 3.12:

  • Even more improved error messages
  • Support for the Linux perf profiler
  • Deprecation of old functions, classes, and modules

While Python 3.11 already improved error messages, the next feature release will offer even better suggestions for fixing errors. For example, check out what it does when you forget to import a module or order your import statements wrong:

>>>
>>> sys.version_infoTraceback (most recent call last):
  File "<stdin>", line 1, in <module>NameError: name 'sys' is not defined. Did you forget to import 'sys'?>>> importpifrommath
  File "<stdin>", line 1importpifrommath^^^^^^^^^^^^^^^^^^^SyntaxError: Did you mean to use 'from ... import ...' instead?

Especially when you’re learning Python, constructive error messages can point you in the right direction to improve your code. But also, if you’re a seasoned Python developer, then the upcoming Python release will have something in stock for your code improvements:

Read the full article at https://realpython.com/python-news-november-2022/ »


[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]


Viewing all articles
Browse latest Browse all 22891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>