Hacker News new | past | comments | ask | show | jobs | submit login

multi-line lambdas.



Not happening, because it would mean multi-line function arguments, which have been declared "ugly".

http://legacy.python.org/dev/peps/pep-3099/


Guido explains in an old blog post (http://www.artima.com/weblogs/viewpost.jsp?thread=147358) that he considers all of the possible implementations of multi-line lambdas to be un-Pythonic:

> But the complexity of any proposed solution for this puzzle is immense, to me: it requires the parser (or more precisely, the lexer) to be able to switch back and forth between indent-sensitive and indent-insensitive modes, keeping a stack of previous modes and indentation level. Technically that can all be solved (there's already a stack of indentation levels that could be generalized). But none of that takes away my gut feeling that it is all an elaborate Rube Goldberg contraption.


Wouldn't you just define a function in that case? Guido has mentioned[1] that he isn't a fan of lambda functions.

[1] http://www.linuxjournal.com/article/2959




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

Search: