##// END OF EJS Templates
style: always use `x is not None` instead of `not x is None`...
Alex Gaynor -
r34332:53133250 default
parent child Browse files
Show More
@@ -393,7 +393,7 b' class HTTPResponse(httplib.HTTPResponse)'
393 def read(self, amt=None):
393 def read(self, amt=None):
394 # the _rbuf test is only in this first if for speed. It's not
394 # the _rbuf test is only in this first if for speed. It's not
395 # logically necessary
395 # logically necessary
396 if self._rbuf and not amt is None:
396 if self._rbuf and amt is not None:
397 L = len(self._rbuf)
397 L = len(self._rbuf)
398 if amt > L:
398 if amt > L:
399 amt -= L
399 amt -= L
@@ -80,7 +80,7 b' class IndexObject(BaseIndexObject):'
80 return i * indexsize
80 return i * indexsize
81
81
82 def __delitem__(self, i):
82 def __delitem__(self, i):
83 if not isinstance(i, slice) or not i.stop == -1 or not i.step is None:
83 if not isinstance(i, slice) or not i.stop == -1 or i.step is not None:
84 raise ValueError("deleting slices only supports a:-1 with step 1")
84 raise ValueError("deleting slices only supports a:-1 with step 1")
85 i = self._fix_index(i.start)
85 i = self._fix_index(i.start)
86 if i < self._lgt:
86 if i < self._lgt:
@@ -114,7 +114,7 b' class InlinedIndexObject(BaseIndexObject'
114 return count
114 return count
115
115
116 def __delitem__(self, i):
116 def __delitem__(self, i):
117 if not isinstance(i, slice) or not i.stop == -1 or not i.step is None:
117 if not isinstance(i, slice) or not i.stop == -1 or i.step is not None:
118 raise ValueError("deleting slices only supports a:-1 with step 1")
118 raise ValueError("deleting slices only supports a:-1 with step 1")
119 i = self._fix_index(i.start)
119 i = self._fix_index(i.start)
120 if i < self._lgt:
120 if i < self._lgt:
General Comments 0
You need to be logged in to leave comments. Login now