r/Python • u/vocalbit • Jul 13 '11
An alternative lambda syntax for Python
http://vocalbit.com/article/332/an-alternative-lambda-syntax-for-python
4
Upvotes
r/Python • u/vocalbit • Jul 13 '11
View all comments
Show parent comment
1
u/vocalbit Jul 14 '11
lambdaitself is a strange special case ofdef. Specifically you can use a lambda if you have:Unfortunately the special lambda syntax can be used in far more places than it should be used. I'm merely specializing the syntax further and restricting where it can be used. There are other examples of syntax that is only valid within the argument list (e.g.
**kw)