[Python-ideas] "else if" as equivalent for "elif"

MRAB python at mrabarnett.plus.com
Wed Oct 21 21:26:47 CEST 2015


On 2015-10-21 19:16, Sven R. Kunze wrote:
> On 21.10.2015 20:05, Ryan Gonzalez wrote:
>> The Python Zen says:
>>
>> There should be one-- and preferably only one --obvious way to do it.
>>
>> elif uses less typing, anyway. Why type 3 more characters when you
>> really don't need to? :D
>
> Because it's one of those "Python looks strange"? ;-)
>
The C preprocessor has #elif. Is that strange too? :-)

(It could be argued that it _is_ strange that the C preprocessor has an
explicitly-terminated "#if ... #endif", whereas the C language itself
doesn't have an explicitly-terminated "if".)



More information about the Python-ideas mailing list