BT

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

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

Bookmarks

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.7 was released in June 2018.

The most notable addition 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 "benevolent dictator for life (BDFL)" last July. The 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.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.