Wednesday, November 17, 2021

Real Python: Python News: What's New From October 2021?

A culmination of great work done by volunteers worldwide, the release of Python 3.10 dominated the Python community’s news cycle in October 2021. At the same time that this release was making new features available, Python got recognition as the top programming language for the month in the TIOBE Programming Community index.

There are also some new opportunities for you to support the community by participating in the Python Developer Survey and answering the PyCon US 2022 Call for Proposals.

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

Free Bonus: Click here to get a Python Cheat Sheet and learn the basics of Python 3, like working with data types, dictionaries, lists, and Python functions.

The Python 3.10 Release

New versions of Python are now released annually. We can look forward to the core developers sharing a lovely goody bag with the rest of us every October. With Python 3.10, which came out of beta on October 4th, everyone had something exciting to anticipate.

Each release of Python has a release manager who’s responsible for coordinating all changes and for building and preparing the files for distribution. The release manager for Python 3.10 and 3.11 is Pablo Galindo Salgado. In a first for Python, he built and released Python live on YouTube.

Python 3.10 Highlights

The new release includes lots of improvements to the language. Among our favorites are improved error messages, simplified syntax for type unions, and structural pattern matching.

Improved error messages will make your life easier, whether you’re a new Python developer or an experienced one. In particular, the feedback that you get when your code isn’t valid Python is more pointed and actionable in Python 3.10 than in previous versions. As an example, consider the following code, where there’s no closing bracket at the end of the first line:

news = ["errors", "types", "patterns"
print(", ".join(news))

In Python 3.9 and earlier, you’ll see the following if you try to run this code:

  File "errors.py", line 2
    print(", ".join(news))
        ^
SyntaxError: invalid syntax

Read the full article at https://realpython.com/python-news-october-2021/ »


[ 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 ]



from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...