2 ms·
> The classic example being the arbitrary restrictions on the Python lambda syntax. That's actually because Guido thinks multi-line expressions are messy to pa
by wizzwizz4 5y ago
> The classic example being the arbitrary restrictions on the Python lambda syntax.
That's actually because Guido thinks multi-line expressions are messy to parse, rather than because they can't be done. Consider:
f = lambda x:
return x + 5
Or, perhaps:
print(sum(map(lambda n, b:
while n:
b.append(n)
n -= 1
return b
, range(3), [[], [], []]), []))
You can see why this was never added to the language, though.