← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #218023]: Whats wrong with ELIF

 

Question #218023 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/218023

    Status: Open => Answered

RaiMan proposed the following answer:
google: Python elif

gives:
http://www.tutorialspoint.com/python/python_if_else.htm

which says:
The syntax of the if...elif statement is:
if expression1:
   statement(s)
elif expression2:
   statement(s)
elif expression3:
   statement(s)
else:
   statement(s)

which means, that elif needs a condition like if.
it is only a short form for:
if something:
    pass
else:
    if somethingelse:
        pass
    else:
        if somethingelsemore:
            pass
......

so it saves indentation.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.