[pygobject: 4/23] dsextras.py: PEP8: Comparisons to singletons like None should always be done with 'is' or 'is not',
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject: 4/23] dsextras.py: PEP8: Comparisons to singletons like None should always be done with 'is' or 'is not',
- Date: Thu, 4 Nov 2010 22:42:54 +0000 (UTC)
commit a565558652ebc3fa49d7aea40d399b06bbe376c4
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Wed Nov 3 06:45:05 2010 +0100
dsextras.py: PEP8: Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators.
Signed-off-by: Dieter Verfaillie <dieterv optionexplicit be>
dsextras.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/dsextras.py b/dsextras.py
index abac18d..cf20289 100644
--- a/dsextras.py
+++ b/dsextras.py
@@ -180,7 +180,7 @@ class BuildExt(build_ext):
save_libs = ext.libraries
# Invoke base build_extension()
build_ext.build_extension(self, ext)
- if save_libs != None and save_libs != ext.libraries:
+ if save_libs is not None and save_libs != ext.libraries:
ext.libraries = save_libs
class InstallLib(install_lib):
@@ -312,7 +312,7 @@ class PkgConfigExtension(Extension):
def can_build(self):
"""If the pkg-config version found is good enough"""
- if self.can_build_ok != None:
+ if self.can_build_ok is not None:
return self.can_build_ok
if type(self.pkc_name) != tuple:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]