3 ms·
The "correct" alternative to multiline lambda might be not a named function but an explicit code block: no clutter at the prize of vertical space. result = [
by d0mine 17y ago
The "correct" alternative to multiline lambda might be not a named function but an explicit code block: no clutter at the prize of vertical space.
result = []
for item in iterable:
# here goes multiline lambda as an explicit suite
# that computes value
result.append(value)