I have some code like this:
if var:
if var2 == getSomeValue()
This could be in a single expression.
if var and var2 == getSomeValue():
...but getSomeValue()
can only be called if var
is True.
So, when calling if var and var2 == getSomeValue()
, are both evaluated by the interpreter, or the evaluation stops at var
if False
? Where I can find this information on python documentation? (I didn't know what to search...:/ )