Categories
Technology

Python 3.8 Will Finally Include the Walrus Operator

An anonymous reader quotes LWN:
Python 3.8 is feature complete at this point, which makes it a good time to see what will be part of it when the final release is made. That is currently scheduled for October, so users don’t have that long to wait to start using those new features.

The headline feature for Python 3.8 is also its most contentious. The process for deciding on Python Enhancement Proposal (PEP) 572 (“Assignment Expressions”) was a rather bumpy ride that eventually resulted in a new governance model for the language. That model meant that a new steering council would replace longtime benevolent dictator for life (BDFL) Guido van Rossum for decision-making, after Van Rossum stepped down in part due to the “PEP 572 mess”.

Out of that came a new operator, however, that is often called the “walrus operator” due to its visual appearance. Using “:=” in an if or while statement allows assigning a value to a variable while testing it… It is a feature that many other languages have, but Python has, of course, gone without it for nearly 30 years at this point. In the end, it is actually a fairly small change for all of the uproar it caused.


Share on Google+

View source

Codice amico Very Mobile Diagonal Media Digital Marketing