For review: PEP 308 - If-then-else expression

Dave Brueck dave at pythonapocrypha.com
Fri Feb 7 14:36:23 EST 2003


On Fri, 7 Feb 2003, Guido van Rossum wrote:

>     The proposed syntax is as follows:
>
>         <expression1> if <condition> else <expression2>

+1 (and I vote Aahz to be the tally-person)

Here's my 2 cents:

- I miss the conditional operator from C; used it sparingly but it sure
was handy sometimes.

- I like C's syntax but mostly because I'm used to it.

- The proposed syntax takes some getting used to but after awhile it
"reads" well.

- Hopefully books and style guides will teach that if-then-else expr abuse
is akin to naming the "self" variable something besides "self" - yeah it's
*possible*, just don't *do* it.

- It'll be nice to get some closure one way or another.

-Dave





More information about the Python-list mailing list