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

Geoffrey Spear geoffspear at gmail.com
Thu Oct 22 14:19:46 CEST 2015


On Wed, Oct 21, 2015 at 4:09 PM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

>
> On Wed, Oct 21, 2015 at 3:49 PM, Geoffrey Spear <geoffspear at gmail.com>
> wrote:
>
>> "We stole this short spelling from C" shouldn't be an argument in favor
>> of any spelling, in my opinion.
>
>
> Can you explain your opinion?  C is by far the most influential language
> in the history of computing.  As a source of keywords it is second only to
> English.
>

Lots of stuff in C favors terseness over readability. Python generally
takes the opposite approach to naming things.

Obviously this is sometimes a cause of confusion to people new to the
language, when people think "oh, Python is just like English, so I should
use 'is' instead of '=='" or "why doesn't `if foo or bar == 'baz'` do what
I mean?", but for the most part having easy-to-read actual English words
for keywords and functions with names that actually say what they do
instead of making some obscure reference to a badly-named C library
function written at a time when limiting identifiers to 6 letters seemed
like a good idea to save precious disk space (or room on a punchcard), in
my opinion, has greatly contributed to Python's reputation as a readable
language. "elif" is a wart, but again, one I think we're stuck with.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20151022/0b8e2e29/attachment.html>


More information about the Python-ideas mailing list