May-11-2022, 05:51 AM
(This post was last modified: May-11-2022, 05:51 AM by Gribouillis.)
(May-10-2022, 01:43 PM)codingCat Wrote: The fact that you have have an assignment operator that returns a value is insane.The walrus operator
:=
appeared only in 2018 with PEP 572. For more than 25 years, Guido van Rossum refused to have an expression assignment operator in Python (as there is in C for example). For old pythonistas like me, this operator breaks somewhat the clean syntax of Python because it allows assignments to be buried into complex expression instead of being clearly visible in the statements sequence. We used to accept the lack of this as a sacrifice for a greater cause.