Permalink
Browse files

Fix comparisons to None (PEP8 E711).

  • Loading branch information...
1 parent 10a6320 commit 1087de6593cd22b62c945a21a346001b160e5455 @cbrueffer cbrueffer committed Dec 6, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 Bio/Motif/_Motif.py
View
@@ -85,7 +85,7 @@ def __init__(self, alphabet=None, instances=None, counts=None):
if alphabet is None:
alphabet = IUPAC.unambiguous_dna
self.alphabet = alphabet
- if self.length==None:
+ if self.length is None:
self.__mask = ()
else:
self.__mask = (1,) * self.length
@@ -170,7 +170,7 @@ def __get_mask(self):
return self.__mask
def __set_mask(self, mask):
- if mask==None:
+ if mask is None:
self.__mask = (1,) * self.length
elif len(mask)!=self.length:
raise ValueError("The length (%d) of the mask is inconsistent with the length (%d) of the motif", (len(mask), self.length))
@@ -253,7 +253,7 @@ def ic(self, background=None):
under the background distribution.
"""
result=0
- if background==None:
+ if background is None:
background = {}
for a in self.alphabet.letters:
background[a] = 1.0

0 comments on commit 1087de6

Please sign in to comment.