linusgroh’s avatarlinusgroh’s Twitter Archive—№ 2,901

    1. …in reply to @mitchell486
      @mitchell486 var := expr does both assign the result of expr to var _and_ serves as an expression (evaluating to expr) as well, so you can now inline a variable assignment in various places - "Assignment Expressions" :^)
  1. …in reply to @linusgroh
    @mitchell486 The intended use is more something like this: if foo := get_foo(): use_foo(foo) replacing foo = get_foo() if foo: use_foo(foo)