News for hackers. Stuff that matters.
Re:Show HN: Koda, a typesafe functional toolkit for Python by FreakLegion on Tuesday February 08, 2022 @03:56AM (#30256232)
Especially given the first example is tailor-made for the walrus operator.

    if (balance := user.get_balance()) and (credit := balance.credit_amount()):
        discount_program = choose_discount(credit)
(Omitting the credit > 0, and without getting into other fundamental issues with the implied design, since it's just a readme example.)

There are no comments on this comment yet.