Re:Dear Python
by jmillikin on Tuesday February 02, 2010 @05:09PM
(#1096317)
The example given (I know it's synthetic, but still) can be written easily as a lambda:
The problem with embedding procedure definitions within parameter lists is indentation. Languages such as JavaScript or Ruby use explicit syntax for indentation, which allows a degree of flexibility in how procedure literals are defined. Python uses only whitespace, so trying to extend the grammar to support arbitrary procedure literals would be very difficult (according to Guido).
[ Parent
| on HN ]
for the same reasons of style and clarity, I prefer my imaginary syntax to the lambda you've defined. And if you want to make it impossible, just imagine it's "print baz(z)".
Anyway, I'm familiar with why Guido doesn't want them, and I totally respect it, and I write 99% of my personal code in python, so I clearly don't think it's a huge deal. It's just something I wish python did have, is all.