MCPcopy Create free account
hub / github.com/dateutil/dateutil / ComparesEqualClass

Class ComparesEqualClass

tests/_common.py:313–341  ·  view source on GitHub ↗

A class that is always equal to whatever you compare it to.

Source from the content-addressed store, hash-verified

311
312
313class ComparesEqualClass:
314 """
315 A class that is always equal to whatever you compare it to.
316 """
317
318 def __eq__(self, other):
319 return True
320
321 def __ne__(self, other):
322 return False
323
324 def __le__(self, other):
325 return True
326
327 def __ge__(self, other):
328 return True
329
330 def __lt__(self, other):
331 return False
332
333 def __gt__(self, other):
334 return False
335
336 __req__ = __eq__
337 __rne__ = __ne__
338 __rle__ = __le__
339 __rge__ = __ge__
340 __rlt__ = __lt__
341 __rgt__ = __gt__
342
343
344ComparesEqual = ComparesEqualClass()

Callers 1

_common.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected