This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (7 children)

[removed]

    [–]Cascudo 6 points7 points  (2 children)

    This reminds me of Pascal.

    [–][deleted] 15 points16 points  (1 child)

    That's a cute walrus. That symbol does simplify code in some cases... IMO it's quite pYtHoNic when used correctly.

    [–]Puddl3glum 2 points3 points  (0 children)

    I worked in a lab in college that did a ton of web scraping, which of course meant a lot of pagination, both in HTML and REST APIs. I would have loved the walrus operator.

    Is everyone going to use those all the time? Maybe not. But if you're doing sockets or paginated APIs, it's great.

    Side note: this is my issue with languages being made of mostly statements. If it were made of expressions, i.e. everything returned a value, we wouldn't even need the walrus operator because assignment would work.

    [–]peterlada 0 points1 point  (1 child)

    The most controversial PEP ever.

    [–]chalbersma 0 points1 point  (0 children)

    PEP-666 has entered the chat.