Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

well, you could pack a lot of other expressions into that expression, especially with 3.8/3.9, e.g.

x,y = 1,2

q = list(map(lambda t: (tx := t*x, ty := t*y, tx+ty)[-1], [1, 2, 3]))



Walrus operator: not even once.


walrus, actually, being an expression, it's a perfect fit for lambdas




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: