mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
Readability (#33128)
This commit is contained in:
parent
80a257c23f
commit
ac286c1d2f
@ -17,7 +17,7 @@ not x | if x is false, then True, else False | (3)
|
||||
|
||||
1. This is a short-circuit operator, so it only evaluates the second argument if the first one is False.
|
||||
2. This is a short-circuit operator, so it only evaluates the second argument if the first one is True.
|
||||
3. 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.
|
||||
3. `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.
|
||||
|
||||
## Examples:
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user