Website hosting service by Active-Venture.com
  

 Back to Index

2.3.2 Boolean Operations

These are the Boolean operations, ordered by ascending priority:

 
Operation  Result  Notes 
x or y if x is false, then y, else x (1)
x and y if x is false, then x, else y (1)
not x if x is false, then True, else False (2)

Notes:

(1)
These only evaluate their second argument if needed for their outcome.
(2)
"not" has a lower priority than non-Boolean operators, so not a == b is interpreted as not (a == b), and a == not b is a syntax error.

  

 

© 2002-2004 Active-Venture.com Webhosting Service

 

Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://python.org/doc/

 

Cheap domain name registration - Register domain name and domain transfer from $5.95/year only

 
Domain registration - Domain registration, domain name transfer and domain search services