From 1a64e92e75741b34537d6a33647e4b82282d5706 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 6 Oct 2014 23:26:35 +0800 Subject: [PATCH] language/units: add mod --- artiq/language/units.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/artiq/language/units.py b/artiq/language/units.py index 1fed268d8..6a7542eb3 100644 --- a/artiq/language/units.py +++ b/artiq/language/units.py @@ -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):