Hacker News new | comments | ask | show | jobs | submit login
Python Assignment Expressions (PEP 572) (python.org)
10 points by stsewd 9 months ago | hide | past | web | favorite | 2 comments



So both "=" and ":=" will be python assignment operators, with the only difference being used in statements vs expressions.

Seems... strange.


A use case not mentioned:

print (x := <something>)




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

Search: