PEP-308 a "simplicity-first" alternative
Tony Lownds
tony-clpy at lownds.com
Wed Feb 12 15:29:44 EST 2003
Erik Max Francis <max at alcyone.com> wrote in message news:<3E4A146A.65EC0878 at alcyone.com>...
> 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' ?
-Tony
More information about the Python-list
mailing list