expression form of one-to-many dict?
aleaxit at yahoo.com
Wed Dec 22 16:21:18 CET 2004
Mike Meyer <mwm at mired.org> wrote:
> > As in, say, calling
> > x = ternary(c, lambda:t, lambda:f)
> > ? The 'lambda:' is a (not nice-looking, but...) "indication of
> > non-evaluation"... or am I misundertanding what you're saying?
> No, you're saying it exactly right. And that does, indeed, do the
> trick. Just a bit ugly is all.
Yeah, there's a PEP to provide alternate, less-ugly syntax sugar for
this specific use of lambda, but I don't think it stands any chance of
More information about the Python-list