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

James P. Rutledge jrut at spamcop.net
Sat Feb 8 20:53:08 EST 2003


<Opinion>

After seeing the mistakes that I and others have made with some of the
current methods of trying to express a similar behavior to the
conditional expression, also with the proposed syntax, and further
considering the arguments made by others my opinion tends to be about
neutral on the idea of adding conditional expressions.

As far as the syntax of such a conditional expression if it were to be
added, however, I strongly agree with those who feel that the least
error prone syntax should read from left to right starting with the
condition, then the expression to be used if the condition evaluates to
True, then the expression to be used if the condition evaluates to
False.  No matter what separators or keywords are used to identify the
construct and its parts.

<\Opinion>

-Jim





More information about the Python-list mailing list