Source

intspan / intspan.py

Diff from to

File intspan.py

         
     def update(self, items):
         super(intspan, self).update(self._parse_range(items))
+        return self
+        
+    def intersection_update(self, items):
+        super(intspan, self).intersection_update(self._parse_range(items))
+        return self
+
+    def difference_update(self, items):
+        super(intspan, self).difference_update(self._parse_range(items))
+        return self
+
+    def symmetric_difference_update(self, items):
+        super(intspan, self).symmetric_difference_update(self._parse_range(items))
+        return self
         
     def discard(self, items):
         for item in self._parse_range(items):
     def symmetric_difference(self, items):
         return intspan(super(intspan, self).symmetric_difference(self._parse_range(items)))
 
-    __le__  = issubset
-    __ge__  = issuperset 
-    __or__  = union
-    __and__ = intersection
-    __sub__ = difference
-    __xor__ = symmetric_difference
-    
-    def __ior__(self, items):
-        return super(intspan, self).__ior__(self._parse_range(items))
+    __le__   = issubset
+    __ge__   = issuperset 
+    __or__   = union
+    __and__  = intersection
+    __sub__  = difference
+    __xor__  = symmetric_difference
+    __ior__  = update
+    __iand__ = intersection_update
+    __isub__ = difference_update
+    __ixor__ = symmetric_difference_update
         
-    def __iand__(self, items):
-        return super(intspan, self).__iand__(self._parse_range(items))
-
-    def __isub__(self, items):
-        return super(intspan, self).__isub__(self._parse_range(items))
-        
-    def __ixor__(self, items):
-        return super(intspan, self).__ixor__(self._parse_range(items))
-    
     def __eq__(self, items):
         return super(intspan, self).__eq__(self._parse_range(items))
-        
+
+    def __lt__(self, items):
+        return super(intspan, self).__lt__(self._parse_range(items))
+
+    def __gt__(self, items):
+        return super(intspan, self).__gt__(self._parse_range(items))
+
     def __iter__(self):
         """
         Iterate in ascending order.