2 ms·
In this particular example, Python has the more wordy `x = 3 if x < 3 else x` which you'd rather write as `x = max(x, 3)` to demonstrate Python's muscles in ter
by kzrdude 5y ago
In this particular example, Python has the more wordy `x = 3 if x < 3 else x` which you'd rather write as `x = max(x, 3)` to demonstrate Python's muscles in terms of useful builtins.
About lambda syntax, to me it would be far more important to allow multiline lambdas than to have a shorter keyword.
- pansa2 5y ago> `x = max(x, 3)` to demonstrate Python's muscles in terms of useful builtins Even Lua has a built-in `math.max` function that works with integers. Maybe it’s Lua’s way of flexing on Go :) > About lambda syntax, to me it would be far more important to allow multiline lambdas than to have a shorter keyword. Never going to happen, unfortunately. It’s just not possible within the fundamental rules of Python’s grammar: that statements use significant indentation and expressions do not.
- deleted 5y ago[deleted]