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

Paul Moore gustav at
Sun Feb 9 15:11:51 CET 2003

Erik Max Francis <max at> writes:

> Paul Moore wrote:
>> Actually, in C, I often find that I *can't* use the ternary operator,
>> because what I want is a default. So
>>     x = y or default
>> is more useful to me. (But Python already has that).
> Except when y might evaluate as false.

Yes, yes. We all know about this. If y might evaluate as false, I
wouldn't use this. I'm not incompetent, you know.

This signature intentionally left blank

More information about the Python-list mailing list