Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on What's Coming in Python 3.8. Parent comment
Disagree. In cases where it's useful it can make the code much clearer. Just yesterday I wrote code of the form:
foos = [] foo = func(a,b,c,d) while foo: foos.append(foo) foo = func(a,b,c,d)
foos = [] while foo := func(a,b,c,d): foos.append(foo)
There are no comments on this comment yet.
Disagree. In cases where it's useful it can make the code much clearer. Just yesterday I wrote code of the form:
With the walrus operator, that would just be: Further, I had to pull out 'func' into a function in the first place so I wouldn't have something complicated repeated twice, so it would remove the need for that function as well.