Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The classic example being the arbitrary restrictions on the Python lambda syntax.

That's actually because Guido thinks multi-line expressions are messy to parse, rather than because they can't be done. Consider:

  f = lambda x:
      return x + 5
Or, perhaps:

  print(sum(map(lambda n, b:
      while n:
          b.append(n)
          n -= 1
      return b
  , range(3), [[], [], []]), []))
You can see why this was never added to the language, though.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: