MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _cmp

Method _cmp

lib/matplotlib/testing/jpl_units/Epoch.py:110–117  ·  view source on GitHub ↗

Compare Epochs *self* and *rhs* using operator *op*.

(self, op, rhs)

Source from the content-addressed store, hash-verified

108 return t._seconds + delta * 86400
109
110 def _cmp(self, op, rhs):
111 """Compare Epochs *self* and *rhs* using operator *op*."""
112 t = self
113 if self._frame != rhs._frame:
114 t = self.convert(rhs._frame)
115 if t._jd != rhs._jd:
116 return op(t._jd, rhs._jd)
117 return op(t._seconds, rhs._seconds)
118
119 __eq__ = functools.partialmethod(_cmp, operator.eq)
120 __ne__ = functools.partialmethod(_cmp, operator.ne)

Callers

nothing calls this directly

Calls 1

convertMethod · 0.95

Tested by

no test coverage detected