2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

language/units: add mod

This commit is contained in:
Sebastien Bourdeauducq 2014-10-06 23:26:35 +08:00
parent 0985a53df2
commit 1a64e92e75

View File

@ -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):