Mercurial > code > home > repos > light9
changeset 492:8707b063876b
support adding submasters for subterm expressions
Ignore-this: 5ef02e8ac1527b5f70bce58432aeb03b
author | drewp@bigasterisk.com |
---|---|
date | Sat, 13 Jun 2009 21:21:00 +0000 |
parents | 17e8859440f3 |
children | b8012dcb714b |
files | light9/Submaster.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/Submaster.py Sat Jun 13 21:20:53 2009 +0000 +++ b/light9/Submaster.py Sat Jun 13 21:21:00 2009 +0000 @@ -121,6 +121,10 @@ __rmul__ = __mul__ def max(self, *othersubs): return sub_maxes(self, *othersubs) + + def __add__(self, other): + return self.max(other) + def __repr__(self): items = self.levels.items() items.sort()