Movatterモバイル変換


[0]ホーム

URL:


Previous PageUp One LevelNext PagePython Library ReferenceContentsModule IndexIndex
Previous:2.2.1 Truth Value TestingUp:2.2 Built-in TypesNext:2.2.3 Comparisons

 
2.2.2 Boolean Operations

These are the Boolean operations, ordered by ascending priority: 

Operation Result Notes 
x oryifx is false, theny, elsex(1)
x andyifx is false, thenx, elsey(1)
notxifx is false, then1, else0(2)
 

Notes:

(1)
These only evaluate their second argument if needed for their outcome.

(2)
"not" has a lower priority than non-Boolean operators, sonota ==b is interpreted asnot (a ==b), anda == notb is a syntax error.


Previous PageUp One LevelNext PagePython Library ReferenceContentsModule IndexIndex
Previous:2.2.1 Truth Value TestingUp:2.2 Built-in TypesNext:2.2.3 Comparisons
Release 2.2.3, documentation updated on 30 May 2003.
SeeAbout this document... for information on suggesting changes.
[8]ページ先頭

©2009-2026 Movatter.jp