Proposed PEP for a Conditional Expression

Joshua Marshall jmarshal at
Wed Sep 12 16:43:15 CEST 2001

thp at wrote:
> Bernhard Herzog <bh at> wrote:
> [...]
> : Another way that come to mind:

> :         <expr> if <cond> else <expr>

One thing I don't like about this suggestion is that <cond> is
evaluated before the first <expr> is [potentially] evaluated, even
though <expr> syntactically precedes <cond>.

More information about the Python-list mailing list