[Python-Dev] conditional expressions? (original) (raw)

Guido van Rossum guido@python.org
Tue, 16 Oct 2001 09:24:40 -0400


Even after reading Daniel's passionate plea, if(cond,expr,expr) looks ugly to me. It also doesn't solve the parsing ambiguity problem -- it still can't be allowed in an expression that starts a line because the parser doesn't know whether it's an if expression or an if statement without many tokens of lookahead.

So, -1 for if(cond,expr,expr).

--Guido van Rossum (home page: http://www.python.org/~guido/)