diff options
author | Pootle Translation <pootle@dev.laptop.org> | 2008-06-09 04:30:03 (GMT) |
---|---|---|
committer | Pootle Translation <pootle@dev.laptop.org> | 2008-06-09 04:30:03 (GMT) |
commit | 560899856f5f248dad625dac8f10907ea90d6f20 (patch) | |
tree | 060894a3c455e9a6a35ca143488a28016f315c3b | |
parent | d1680a5c65bd5ce36e0a7079b1d144628df42616 (diff) | |
parent | ae4683aa24963bc7be9e3729220c42ccf76f64d8 (diff) |
Merge branch 'master' of git+ssh://dev.laptop.org/git/projects/calculate
-rw-r--r-- | rational.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rational.py b/rational.py index 381b05a..34b298f 100644 --- a/rational.py +++ b/rational.py @@ -95,7 +95,7 @@ class Rational: return ret def __rsub__(self, lval): - return self.__sub__(lval) + return -self.__sub__(lval) def __mul__(self, rval): if isinstance(rval, Rational): @@ -124,7 +124,7 @@ class Rational: return self.__div__(lval) def __neg__(self): - self.n = -self.n + return Rational(-self.n, self.d) def __abs__(self): self.n = abs(self.n) |