WingNews logo WingNews
top | new | best | ask | show | jobs | submit
GitHub [2]
top | item 16938220

Python Assignment Expressions (PEP 572)

10 points| stsewd | 7 years ago |python.org

2 comments

order
[+] [-] metalliqaz|7 years ago|reply
So both "=" and ":=" will be python assignment operators, with the only difference being used in statements vs expressions.

Seems... strange.

[+] [-] olskool|7 years ago|reply
A use case not mentioned:

print (x := <something>)

powered by hn/api // news.ycombinator.com