conditional expressions

Mike Rovner mike at
Wed Sep 25 13:48:05 EDT 2002

"Greg Ewing" <see_reply_address at something.invalid> wrote in message
news:3D911FE1.1050801 at something.invalid...
> thp at wrote:
> Personally, I rather like
>     a if b else c
> but Guido doesn't like that either, unfortunately.
> Perhaps I'll slip it into Pyrex when no-one's looking...:-)

It's not as readable as one think ;)

I, personally, read this as 'take a if b is true else take c' which
corresponds to 'b? a: c' in C.
So, please, don't create ambiguity from nowhere.

gratefully-plex-er-ly yours,

More information about the Python-list mailing list