MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/iohrl/an_alternative_lambda_syntax_for_python/c25f5o0/?context=3
r/Python • u/vocalbit • Jul 13 '11
41 comments sorted by
View all comments
10
I agree with vph: this takes a general concept (lambda) and makes it a strange special case.
I'm not a fan of the proposed syntax either:
f(key=lambda x:...)
makes it clear that you are setting key to a function,
key
f(key(x)=...)
makes it look like you are setting a function of key to a value.
2 u/kataire Jul 13 '11 Also it is confusingly similar to {key(x):...} which is completely different.
2
Also it is confusingly similar to {key(x):...} which is completely different.
{key(x):...}
10
u/ndanger Jul 13 '11 edited Jul 13 '11
I agree with vph: this takes a general concept (lambda) and makes it a strange special case.
I'm not a fan of the proposed syntax either:
makes it clear that you are setting
keyto a function,makes it look like you are setting a function of key to a value.