1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-11-21 18:54:20 +01:00

Fix minor typo in the "is not" example

This commit is contained in:
Satwik Kansal 2020-01-20 14:23:20 +05:30 committed by GitHub
parent bd7cd4334c
commit 6cebc952c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
README.md vendored
View File

@ -933,7 +933,8 @@ 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. In this expression, `(not None)` evaluates to `True`, since `None` is is `False` in a boolean context, so the expression becomes `'something' is True`.
- `is not` evaluates to `False` if the variables on either side of the operator point to the same object and `True` otherwise.
- In the example, `(not None)` evaluates to `True` since the value `None` is `False` in a boolean context, so the expression becomes `'something' is True`.
---