Hacker News new | ask | show | jobs
by masklinn 2367 days ago
Python's principle is not an has never been "one way to do it". Python's principle is:

> There should be one — and preferably only one — obvious way to do it.

Which is a very, very different assertion. And there remains one — and exactly only one — obvious way to do an assignment, because the walrus operator is literally invalid syntax as a statement:

    >>> [a:=1]
    [1]
    >>> a:=1
      File "<stdin>", line 1
        a:=1
         ^
    SyntaxError: invalid syntax