X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/966727e8d6a1bcbb27dfb1586daa233b006b4fca..491b8f0501c7b3d8b7c33d85a430845d245da5c9:/pypol/linear.py?ds=inline diff --git a/pypol/linear.py b/pypol/linear.py index de6f4ca..c169049 100644 --- a/pypol/linear.py +++ b/pypol/linear.py @@ -158,7 +158,8 @@ class Expression: constant = self.constant - other.constant return Expression(coefficients, constant) - __rsub__ = __sub__ + def __rsub__(self, other): + return -(self - other) @_polymorphic_method def __mul__(self, other):