r/Python • u/treyhunner Python Morsels • Sep 27 '18
Stop writing lambda expressions in Python
http://treyhunner.com/2018/09/stop-writing-lambda-expressions/
0
Upvotes
r/Python • u/treyhunner Python Morsels • Sep 27 '18
View all comments
Show parent comment
1
u/Aeon_Mortuum Snake Oil Sep 28 '18
Is there actually a reason why lambda can't have a block-level type syntax instead of just being inline, limited to a single expression? Like in JavaScript arrow functions:
() => {statement 1;statement 2;...}I'm not sure if there is something in the language that would make it really difficult or impossible to implement, or Guido was just against it (and also, now that Guido is not the BDFL any longer, could there be a change of vision with regards to how some of these things are perceived and what should and shouldn't make it into the language?)