Readability (#33128)
This commit is contained in:
@@ -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.
|
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.
|
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:
|
## Examples:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user