52
tizo
8y

Inventor of Python: "Let's make the syntax annoyi....different. Let's make it different."

Comments
  • 12
    Python syntax just makes sense. Not that hard to pick up...
  • 2
    For example elif is just different and not usefully different
  • 6
    How indentation in python is strict. else if would make unnecessary indentation level.

    if x < 0:
    sth()
    else:
    if x > 0:
    sth_else()
    else:
    sth_elsier()

    Is the only proper Python use of else if.

    See: http://stackoverflow.com/a/3742602/...
  • 0
    @afrometal sth_elsier 😂
  • 0
    @Lythenas This should explain why Python needs the elif statement http://stackoverflow.com/a/13096142
  • 1
    I know why it needs something like elif. But why not just call it "else if" or "elseif". It bothers me a little bit because I think it makes the code lass readable.
  • 2
    @Lythenas Maybe because elseif looks and writes like shit or because elif is shorter ( also I guess anyone should be able to know what elif means even without looking it up). Or maybe a combination of all of them. We will probably never know :)
  • 2
    Both else and elif are 4 letters. And ut was used in other languages before. Never ever have I seen elseif. And else if is wrong with Python syntax and as Python is designed to have only one obvious way of doing things it is wrong at the beginning. So here. Thats why elif in my opinion.
  • 1
    @afrometal php has elseif 😂
    But if other languages had it before I get it.
  • 2
    @Lythenas well... Thats php. Best proof that you do not have to be beautiful to be popular xD
  • 3
    "hey boy, r u http because ://".
  • 0
    @afrometal @Lythenas lua has elseif too. I like elif because it is shorter. Less keystrokes.
  • 0
    Didn't Ruby use elsif? To add to the confusion, I imagine.
Add Comment