PEP 308: Pep Update

John Roth johnroth at ameritech.net
Thu Feb 13 08:43:54 EST 2003


"Raymond Hettinger" <vze4rx4y at verizon.net> wrote in message
news:6qH2a.32424$F25.27498 at nwrddc02.gnilink.net...
> Amended the PEP to reflect some convergence on the newsgroup:
>
> * Listed the downsides of the current proposal.
>
> * Listed why '<cond> then <expr1> else <expr2>' is starting to
>    be preferred over '<cond> and <expr1> or <expr2>'.
>
> * After BDFL comments, I withdrew my c??a||b syntax
>    and deleted the rejected c?a!b syntax.  The remaining
>    punctuation based contender is c?a:b.
>
> * After BDFL rejection of non-short-circuiting options,
>    advocacy dropped sharply.  Removed it from the list of
>    contenders.
>
> The leading options on the table are:
>
> *     (if <cond>: <expr1> else: <expr2>)
> *     <cond> then <expr1> else <expr2>
> *     <cond> ? <expr1> : <expr2>
> *     no change
>
>
> Raymond Hettinger

I just looked at the PEP. Great job!

However:
the "elif" option should have a colon after it,
and "elif" should be added as an option to the
"then-else" variant.

I like the first two about equally (especially if
an elif was added, which is not possible with
the last one. Each has a flaw, though. I'd go
with whichever option appeals to the BDFL
and the rest of the community.

I don't like the last two options.

John Roth
>
>






More information about the Python-list mailing list