[Python-ideas] filter

Josef Eschgfaeller esg at unife.it
Mon Sep 28 01:20:30 CEST 2009


It would be nice to have a syntax like

    [f(x) for x in u and cond(x)]

instead of list(map(f,filter(cond,u))).

For avoiding interference with a common and it could be

    [f(x) for x in u andcond cond(x)]

or perhaps

    [f(x) for x in u with cond(x)]

if this is not interfering.

Josef Eschgfaeller



More information about the Python-ideas mailing list