Lines Matching refs:other
45 def __eq__(self, other):
46 c = self._cmp(other)
51 def __lt__(self, other):
52 c = self._cmp(other)
57 def __le__(self, other):
58 c = self._cmp(other)
63 def __gt__(self, other):
64 c = self._cmp(other)
69 def __ge__(self, other):
70 c = self._cmp(other)
88 # _cmp (self, other) - compare two version numbers ('other' may
166 def _cmp (self, other):
167 if isinstance(other, str):
168 other = StrictVersion(other)
169 elif not isinstance(other, StrictVersion):
172 if self.version != other.version:
175 if self.version < other.version:
182 # case 2: self has prerelease, other doesn't; other is greater
183 # case 3: self doesn't have prerelease, other does: self is greater
186 if (not self.prerelease and not other.prerelease):
188 elif (self.prerelease and not other.prerelease):
190 elif (not self.prerelease and other.prerelease):
192 elif (self.prerelease and other.prerelease):
193 if self.prerelease == other.prerelease:
195 elif self.prerelease < other.prerelease:
228 # The problem is what to do with letters (and other non-numeric
333 def _cmp (self, other):
334 if isinstance(other, str):
335 other = LooseVersion(other)
336 elif not isinstance(other, LooseVersion):
339 if self.version == other.version:
341 if self.version < other.version:
343 if self.version > other.version: