Skip to content

Commit

Permalink
Fix comparisons to None (PEP8 E711).
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrueffer committed Dec 6, 2012
1 parent 10a6320 commit 1087de6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Bio/Motif/_Motif.py
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1087de6

Please sign in to comment.