News for hackers. Stuff that matters.
Re:What's Coming in Python 3.8 by adjkant on Wednesday July 17, 2019 @05:05PM (#20464005)
I write a good deal of python and I can't think of a line of code that I would use it for besides the while loop on a non-iterable data source, which is such a once in a blue moon case. As mentioned by others, the operator invites more ways to do the same thing, which is not what Python has been viewed as being about.
Re:What's Coming in Python 3.8 by orangecat on Wednesday July 17, 2019 @07:02PM (#20464923)
Victor Stinner made a demonstration pull request using the walrus operator in the standard library where it makes sense. On balance it removes several hundred lines and often makes the code much clearer, e.g. https://github.com/python/cpython/pull/8122/files#diff-78e8e...
Re:What's Coming in Python 3.8 by mixmastamyk on Wednesday July 17, 2019 @08:54PM (#20465610)
The argument was about mostly about the syntax.

In the link above, the "as" keyword would work with (very close to) all of those lines and arguably more readable.

Re:What's Coming in Python 3.8 by drexlspivey on Wednesday July 17, 2019 @07:22PM (#20465057)
I do this all the time:

x = function_that_might_return_none()

if x: do_stuff