diff options
author | kennytm <kennytm@gmail.com> | 2017-10-10 00:16:26 +0800 |
---|---|---|
committer | kennytm <kennytm@gmail.com> | 2017-10-10 00:27:24 +0800 |
commit | d7f1a260b94e7d7da461a8565392435d9ebc3c56 (patch) | |
tree | e82fa0ac13e0a798befa7c28adddd99cea2ebb04 | |
parent | 380b7951acc658b8eded4cfd86f93133044102d8 (diff) | |
parent | d9e67038346d0b3f6509c7d881f1dc63b04cd160 (diff) | |
download | rust-d7f1a260b94e7d7da461a8565392435d9ebc3c56.tar.gz |
Rollup merge of #45120 - johnthagen:none-identity-test, r=sfackler
Use identity operator `is` when comparing to None
This is very minor, but idiomatic Python code uses `is` for comparisons to `None`. This is because semantically we want to compare to the "identity" of `None`, not its value.
See [PEP8 for details](https://www.python.org/dev/peps/pep-0008/#programming-recommendations).
-rw-r--r-- | src/bootstrap/bootstrap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 4a8c3dcebcb..25768867439 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -498,7 +498,7 @@ class RustBuild(object): If the key does not exists, the result is None: - >>> rb.get_toml("key3") == None + >>> rb.get_toml("key3") is None True """ for line in self.config_toml.splitlines(): |