Hacker News new | ask | show | jobs
by brutimus 5978 days ago
I don't understand the argument either.. I use multi-line lambdas with ifs and forloops all the time.

  f = lambda x:(
    x if (
      x**2 > 10 or x**2 < 5
    )
    else x**3
  )
1 comments

I don't think you can assign variables in these blocks, nor do sequential statements. Imagine you wanted to reduce a list, and then do something on it. Print statements don't work either.