Mobile Monitoring Solutions

Search
Close this search box.

On the road to Python 3.8: Assignment Expressions, Merging typed_ast and Multiprocessing Improvement

MMS Founder
MMS RSS

Article originally posted on InfoQ. Visit InfoQ

The first two deployments of the Python 3.8 development branch were released this month, on the road to releasing the final version later this year. The fastest growing programming language as measured by Stack Overflow is starting development on the next major version a few months after 3.8 was released in June 2018.

The most notable addition up to date is PEP 572, assignment operators. Assignment operators was one of the most controversial features in Python’s history and led to Guido stepping down as the BDFL (Benevolent dictator for life) last July. Assignment operator also known as Walrus operator allows a named expression of the format NAME := expr to appear in the context of a Python expression. The target is assigned the value of the expression which is the same as the incorporated expression. In layman’s terms, we can now have a condition with an expression that evaluates and can be used inside the condition’s code.

Other improvements include merging the typed_ast project into CPython and performance improvements for multiprocessing. The typed_ast project is used by flake8, mypy, pytype and other highly visible Python projects. As a fork of CPython’s ast it provides in Guido’s words “fields to certain nodes that hold the type comment, and it adds a bitmap indicating which lines contain # type: ignore comments (which look like type comments but really are a different thing – they can occur in places where a type comment would not be legal)”.

Python 3.8 alpha 3 and 4 will be released in the next two months. Four beta versions and two release candidates will be released in the following six months with the 3.8.0 final release expected around October 20, 2019.

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.