Skip to content

Commit f20be4c

Browse files
committed
Extend the explanation of the "is not ..." section
I thought that the explanation for "'something' is (not None)" could be a little more explicit.
1 parent de113d2 commit f20be4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ False
933933
#### 💡 Explanation
934934
935935
- `is not` is a single binary operator, and has behavior different than using `is` and `not` separated.
936-
- `is not` evaluates to `False` if the variables on either side of the operator point to the same object and `True` otherwise.
936+
- `is not` evaluates to `False` if the variables on either side of the operator point to the same object and `True` otherwise. In this expression, `(not None)` evaluates to `True`, since `None` is is `False` in a boolean context, so the expression becomes `'something' is True`.
937937
938938
---
939939

0 commit comments

Comments
 (0)