projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Expression.__rsub__
[linpy.git]
/
pypol
/
linear.py
diff --git
a/pypol/linear.py
b/pypol/linear.py
index
de6f4ca
..
c169049
100644
(file)
--- a/
pypol/linear.py
+++ b/
pypol/linear.py
@@
-158,7
+158,8
@@
class Expression:
constant = self.constant - other.constant
return Expression(coefficients, constant)
constant = self.constant - other.constant
return Expression(coefficients, constant)
- __rsub__ = __sub__
+ def __rsub__(self, other):
+ return -(self - other)
@_polymorphic_method
def __mul__(self, other):
@_polymorphic_method
def __mul__(self, other):