Merge pull request #175 from larsks/fix/is-not

Extend the explanation of the "is not ..." section
This commit is contained in:
Satwik Kansal
2020-01-20 14:20:57 +05:30
committed by GitHub

2
README.md vendored
View File

@@ -933,7 +933,7 @@ False
#### 💡 Explanation
- `is not` is a single binary operator, and has behavior different than using `is` and `not` separated.
- `is not` evaluates to `False` if the variables on either side of the operator point to the same object and `True` otherwise.
- `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`.
---