For review: PEP 308 - If-then-else expression
RPM1
rpm1deleteme at frontiernet.net
Sat Feb 8 08:45:25 EST 2003
"Sean Ross" <frobozz_electric at hotmail.com> wrote:
>>
>> The proposed syntax is as follows:
>>
>> <expression1> if <condition> else <expression2>
>>
>
>While I do not think this is necessary, I would like to offer an alternative
>syntax:
>
> <expression1> when <condition> else <expression2>
>
>The only benefit I can see to this alternative syntax is that it will be
>less likely to be confused with the existing syntax for if/elif/else, which
>is probably a good thing. Although adding a keyword is often a bad thing...
>
>
I agree. I'm -1 with the original proposal. If they change to "when" I
would be
+1.
Patrick Mullhaupt
More information about the Python-list
mailing list