Lambda going out of fashion
aleaxit at yahoo.com
Thu Dec 23 21:40:43 CET 2004
<tanghaibao at gmail.com> wrote:
> Thanks. :-) Two remarks.
> o One-liner fits the eyes & brains of a portion of people.
True! So, personally, I'd rather code, e.g.,
def bools(lst): return map(bool, lst)
rather than breal this one-liner into two lines at the colon, as per
standard Python style. However, uniformity has its advantages, too; I'm
ready for the one-liner style to be outlawed in Python 3.0, purely in
the advantage of uniformity.
Note that lambda is utterly useless here, be it for one-liners or not.
More information about the Python-list