PEP-308 a "simplicity-first" alternative

Tony Lownds tony-clpy at
Wed Feb 12 21:29:44 CET 2003

Erik Max Francis <max at> wrote in message news:<3E4A146A.65EC0878 at>...
> Tony Lownds wrote:
> > The if x: y else: x syntax still doesn't read like an expression for
> > me, probably because it doesn;t look like an operator. Whether the
> > "else" has a colon or not seems forgettable. But its pretty readable.
> So what about
> 	C then x else y

That would be fine with me. A bit better than and/else, having a
operator conceptually be both binary and ternary puts me off.

> I think `if C: x else: y' is the front runner, but I'd be satisfied with
> `C then x else y' or 

Same here; satisfied with both.

>`if C then x else y'.

What advantage does this have over either `if C: x else: y' or `C then
x else y'

So what about `C ? x : y' ?


More information about the Python-list mailing list