Python 3.9 Release: What's New?
Python with no doubt has been the best companion for Data Science. With its wide range of libraries that allow core data analysis activities, it has been ruling the Analytics and Machine Learning Kingdom for a while now.
The programming language is being updated regularly with new features and supports. And since the release of Python 3.9 is near, What do you think will be the most noteworthy and interesting changes that this version will bring along for all the Developers?
In this article, we will dive into what we can expect with this version:
Major Features expected in Python 3.9: What’s new?
-
Addition of Dictionary Merge & Update Operators.
-
New removeprefix() and removesuffix() methods in order to easily remove an unneeded prefix or a suffix from a string.
-
Addition of Corresponding bytes, bytearray, and collections.UserString methods.
-
Built-in Generic Types such as list and dict as generic types can now be used in type annotations instead of importing the corresponding capitalized types.
-
Python 3.9 uses a new more flexible parser, based on PEG.
Improvement in Modules:
The new version of Python will see improvements in many modules. A few of them are:
ast:
-
Addition of indent option to dump()
-
Addition of ast.unparse() as a function in the ast module
-
Addition docstrings to AST nodes that comprises of the ASDL signature used to construct that node.
asyncio:
-
The reuse_address parameter of asyncio.loop.create_datagram_endpoint() is no longer supported
-
Addition of a new coroutine shutdown_default_executor()
-
Addition of a Linux-specific child watcher implementation: asyncio.PidfdChildWatcher
concurrent.futures:
-
Addition of a new cancel_futures parameter to concurrent.futures.Executor.shutdown()
-
Removal of daemon threads from ThreadPoolExecutor and ProcessPoolExecutor.
-
Only when there are no available idle workers to reuse, the workers in ProcessPoolExecutor will be spawned on demand.
What is expected to be Deprecated:
-
The distutils bdist_msi command has now been deprecated,
-
As of now, math.factorial() accepts float instances with non-negative integer values and raises a ValueError for non-integral and negative floats. This has now been deprecated.
-
The parser module is deprecated.
-
Utilization of NotImplemented in a boolean context has been deprecated,
-
Now binhex4 and hexbin4 standards are deprecated.
Optimizations:
-
Optimization of the idiom for assigning a temporary variable in comprehensions.
-
Optimizing signal handling in multithreaded applications.
-
Optimizing the subprocess module on FreeBSD using closefrom().
Given above are a few among the list, for an in-depth list and detail of the optimizations, depreciation as well as removals in Python 3.9, one can go through the link below.
For more information: Click Here