Python is one of the most popular programming languages today. It is used in a wide variety of fields and applications, from learning the basics of computer science to performing complex and straightforward scientific computing tasks to building games. It is even used in advanced areas like data science and quantum computing.
Python gained popularity for many reasons. The two most important ones are how versatile Python is and how relatively easy it is to learn compared to other programming languages. In addition, Python is maintained and developed by the Python Software Foundation, which is always working on new ways to improve Python.
A week ago (Oct 4th, 2021), a new version of Python was released, Python 3.10. In this new version, unique and valuable features were added to Python, while some old features were removed. We can categorize the features added or removed to several categories in any new software release, such as syntax features, add to the default library, or improvements to an existing feature.
Python 3.10 has several new and cool features that make working with Python an even better experience. In this article, I will share with you 6 new features and add-ons that I am most excited about and glad to see added to Python.
№1: Better Error Tracking
As a person who uses Python every day to write code and teach coding, I am well aware of the frustration of getting a syntax error. Although syntax errors are easy to fix once you get ahold of Python and programming, sometimes we wish for better error messages that can help us locate the error better and save time on debugging.
In Python 3.10, dealing with errors is much better because of two features, better error messages and precise line numbers for debugging. For example, let’s consider the following code, where we have a dictionary and a function. However, in this code, we forgot to close the dictionary.