Steven D'Aprano <[email protected]>: > So why is it hard to read when the index is a flag? > > value = [f, g][cond]()
So, subjectively, which syntax would you prefer:
if j < 10:
j += 1
else:
j = 3
or:
j = j + 1 if j < 10 else 3
or:
j = (lambda: 3, lambda: j + 1)[j < 10]()
Marko
--
https://mail.python.org/mailman/listinfo/python-list
