4 ms·
>it would be create potential readability difficulties for human reading I think the major argument (at least, the one I see most frequently) is that the walru
by txcwpalpha 7y ago
>it would be create potential readability difficulties for human reading
I think the major argument (at least, the one I see most frequently) is that the walrus operator does create readability difficulties for humans, which is exactly why many people view it as non-pythonic. This is one of the few times I've seen someone argue that ":=" makes things more readable.
- dragonwriter 7y agoAn argument against expression assignment is that it can create readability problems compared to separating the assignment from the expression in which the value is used. Even most supporters of the feature agree that this can be true in many cases and that it should be used judiciously. This is in no way contrary to the argument that the walrus operator improves readability of expression assignments compared to using the same operator that defines assignment statements.