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

Walrus operator in Python.


Except that the walrus operator “:=” is an assignment expression, whereas in Pascal it is an assignment statement, like “=” in many languages. In Pascal, the boolean comparison operator is “=” instead of “==” (in the same many languages).

And there is C where the assignment expression is just “=”, there is no assignment statement, and many forgotten double equals led to bugs …




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

Search: