Lines Matching refs:other

10 # documentation and/or other materials provided with the distribution;
28 '''This object always compares less than any other object'''
30 def __lt__(self, other): return type(self) != type(other)
31 def __le__(self, other): return True
32 def __gt__(self, other): return False
33 def __ge__(self, other): return type(self) == type(other)
34 def __eq__(self, other): return type(self) == type(other)
35 def __ne__(self, other): return type(self) != type(other)
39 '''This object always compares greater than any other object'''
41 def __lt__(self, other): return False
42 def __le__(self, other): return type(self) == type(other)
43 def __gt__(self, other): return type(self) != type(other)
44 def __ge__(self, other): return True
45 def __eq__(self, other): return type(self) == type(other)
46 def __ne__(self, other): return type(self) != type(other)
76 def __contains__(self, other):
77 '''other is
78 region: True if self and other is fully contained within self.
79 pos: True if other is within the region'''
80 if isinstance(other, tuple):
81 return self[0] <= other[0] and self[1] >= other[1]
82 return self[0] <= other and other < self[1]
84 def __eq__(self, other):
85 '''other is
86 region: True if self and other are identical.
87 pos: True if other is within the region'''
88 if isinstance(other, tuple):
89 return self[0] == other[0] and self[1] == other[1]
90 return self[0] <= other and other < self[1]
93 # @param other is a region.
94 # @return if self and other are not identical.
95 def __ne__(self, other):
96 '''other is
98 pos: True if other is not in the region'''
99 if isinstance(other, tuple):
100 return self[0] != other[0] or self[1] != other[1]
101 return other < self[0] or self[1] <= other
104 # @param other is a region.
105 # @return if self is less than other and does not overlap self.
106 def __lt__(self, other):
107 "self completely left of other (cannot overlap)"
108 if isinstance(other, tuple):
109 return self[1] <= other[0]
110 return self[1] <= other
113 # @param other is a region.
114 # @return if self is less than other. self may overlap other,
115 # but not extend beyond the _end of other.
116 def __le__(self, other):
117 "self extends to the left of other (can overlap)"
118 if isinstance(other, tuple):
119 return self[0] <= other[0]
120 return self[0] <= other
123 # @param other is a region.
124 # @return if self is greater than other and does not overlap other.
125 def __gt__(self, other):
126 "self is completely right of other (cannot overlap)"
127 if isinstance(other, tuple):
128 return self[0] >= other[1]
129 return self[0] > other
132 # @param other is a region.
133 # @return if self is greater than other. self may overlap other,
134 # but not extend beyond the beginning of other.
135 def __ge__(self, other):
136 "self ex_ends beyond other to the right (can overlap)"
137 if isinstance(other, tuple):
138 return self[1] >= other[1]
139 return self[1] > other
170 def __iand__(self, other):
172 B = other.regions
177 while i < len(self) and j < len(other):
225 def __and__(self, other):
227 result &= other