Monday, April 5, 2021

Python News: What's New From March 2021?

Python is a dynamic language in more ways than one: Not only is it not a static language like C or C++, but it’s also constantly evolving. If you want to get up to speed on what happened in the world of Python in March 2021, then you’ve come to the right place to get your news!

March 2021 marks a notable change to the core of the Python language with the addition of structural pattern matching, which is available for testing now in the latest alpha release of Python 3.10.0.

Beyond changes to the language itself, March was a month full of exciting and historical moments for Python. The language celebrated its 30th birthday and became one of the first open-source technologies to land on another planet.

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

Python Turns 30 Years Old

Although Python’s actual birth date is February 20, 1991, which is when version 0.9.0 was released, March is a good month to celebrate. This March is the 20th anniversary of the Python Software Foundation, which was founded on March 6, 2001.

In its thirty years, Python has changed—a lot—both as a language and as an organization. The transition from Python 2 to Python 3 took a decade to complete. The organizational model for decision-making changed too: The creator of the language, Guido van Rossum, used to be at the helm, but a five-person steering council was created in 2018 to plan the future of Python.

Happy birthday, Python! Here’s to many more years πŸ₯‚

Structural Pattern Matching Comes to Python 3.10.0

Python 3.10.0 is the next minor version of Python and is expected to drop on October 4, 2021. This update will bring a big addition to the core syntax: structural pattern matching, which was proposed in PEP 634. You could say that structural pattern matching adds a sort of switch statement to Python, but that isn’t entirely accurate. Pattern matching does much more.

For instance, take an example from PEP 635. Suppose you need to check if an object x is a tuple containing host and port information for a socket connection and, optionally, a mode such as HTTP or HTTPS. You could write something like this using an ifelifelse block:

Read the full article at https://realpython.com/python-news-march-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 Real Python
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...