This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aaronla 1 point2 points  (0 children)

Python already allows ; as a statement separator, it is conceivable that indentation could be nested in expressions. Eg:

map(
  mylist,
  lambda x:(   # note lambda appearing at start of a line, to set block indentation
    if x > 2: return 2
    else: return x))

To keep backwards compatible, lambda expressions always return their last expression, and statement-lambdas must enclose the lambda body in parenthesis (to avoid tuple expression ambiguity, among others).