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

Ryan Gonzalez rymg19 at gmail.com
Wed Oct 21 21:29:32 CEST 2015



On October 21, 2015 2:26:47 PM CDT, MRAB <python at mrabarnett.plus.com> wrote:
>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".)
>

It's the C preprocessor. How is it NOT strange? :)

>_______________________________________________
>Python-ideas mailing list
>Python-ideas at python.org
>https://mail.python.org/mailman/listinfo/python-ideas
>Code of Conduct: http://python.org/psf/codeofconduct/

-- 
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.


More information about the Python-ideas mailing list