bool-logicok
Structure
fn · h1main
comment
bind
`a` = Truebind
`b` = Falsebranch
arm
`a` and not `b`call
> print text=okarm
elsecall
> print text=failbind
`probe` = 1branch
arm
Nonecall
> print text=none-truthyarm
elsecall
> print text=none-falsyExecution
ok
none-falsy
Source
--- title: 布尔与逻辑 description: True / False / None 与 and / or / not --- # main 关键字:`True`、`False`、`None`,以及 `and` / `or` / `not`。 *`a` = True* *`b` = False* + `a` and not `b` > print text=ok + * > print text=fail *`probe` = 1* + None > print text=none-truthy + * > print text=none-falsy
关键字:
True、False、None,以及and/or/not。