mirror of https://github.com/m-labs/artiq.git
language/units: add mod
This commit is contained in:
parent
0985a53df2
commit
1a64e92e75
|
@ -131,6 +131,12 @@ class Quantity:
|
|||
def __rsub__(self, other):
|
||||
return self._binop(other, "__rsub__", addsub_dimension)
|
||||
|
||||
def __mod__(self, other):
|
||||
return self._binop(other, "__mod__", addsub_dimension)
|
||||
|
||||
def __rmod__(self, other):
|
||||
return self._binop(other, "__rmod__", addsub_dimension)
|
||||
|
||||
# comparisons
|
||||
def _cmp(self, other, opf_name):
|
||||
if isinstance(other, Quantity):
|
||||
|
|
Loading…
Reference in New Issue