• sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    6 months ago

    The general form is:

    (var := expression) rest of condition
    

    So you can do something awful like this:

    lambda: (y := 1) != 2 and y
    

    Not sure if that’s “good,” but it does kind of let you sneak a statement into the lambda.