Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Okay. As jaydfox points out, there are three things :

  • and evaluates "lazily" from left to right, and stops at the first argument evaluated to False.

  • Anything that can't be proven True evaluates to False.

  • and returns the first False argument unevaluated.

The last one baffles me. it means that I can't write if sin(x>0 and cos(x>0): doSomething(): I would doSomething() if x was unbound....

I need to write if (sin(x)>0 and cos(x)>0) is True: doSomething().