Why ELIF?

Grant Edwards invalid at invalid.invalid
Sun Oct 11 10:10:49 EDT 2009


On 2009-10-11, metal <metal29a at gmail.com> wrote:

> I wonder the reason for ELIF. it's not aligned with IF, make code ugly

It most certainly is aligned with IF:


  if cond1:
      do this
  elif cond2:
      do that
  else:
      do the other

The "if" "elif" and "else" are all aligned in all of the code
I've ever seen.

-- 
Grant




More information about the Python-list mailing list