News for hackers. Stuff that matters.
Re:What's Coming in Python 3.8 by fatbird on Wednesday July 17, 2019 @07:18PM (#20465020)
The unix philosophy of simplicity was on a per tool basis, not function or line of code. The walrus operator is Python version of what we can do now in C or in JS, doing plain assignment in an expression while evaluating it for truthiness. And more often than not, the point of that single-purposeness in Unix is so you can chain a bunch of piped commands that result in a perl-like spaghetti command that's three terminal widths long.
Re:What's Coming in Python 3.8 by jstimpfle on Thursday July 18, 2019 @06:00AM (#20468283)
> while evaluating it for truthiness

no, it evaluates to the left side's value after assignment

Re:What's Coming in Python 3.8 by fatbird on Thursday July 18, 2019 @11:12AM (#20470637)
Well, yes, that's right: the return value of an assignment expression is the left side's value, which is what makes the assignment/evaluation work.