GUI working again w/new parser setup. Live print isn't working due to use of print instead of return.

This commit is contained in:
Nick Foster
2013-06-19 11:24:11 -07:00
parent 12c09ba1df
commit fbe3c464fb
6 changed files with 42 additions and 39 deletions

View File

@@ -69,8 +69,10 @@ class stamp:
ipart = self.secs + other.secs
fpart = self.frac_secs + other.frac_secs
return stamp(ipart, fpart)
elif isinstance(other, float) or isinstance(other, int):
return float(self) + other
elif isinstance(other, float):
return self + stamp(0, other)
elif isinstance(other, int):
return self + stamp(other, 0)
else:
raise TypeError
@@ -79,8 +81,10 @@ class stamp:
ipart = self.secs - other.secs
fpart = self.frac_secs - other.frac_secs
return stamp(ipart, fpart)
elif isinstance(other, float) or isinstance(other, int):
return float(self) - other
elif isinstance(other, float):
return self - stamp(0, other)
elif isinstance(other, int):
return self - stamp(other, 0)
else:
raise TypeError