X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/9f42c3add9b8f9eb69084323c816977d52902d0b..491b8f0501c7b3d8b7c33d85a430845d245da5c9:/pypol/linear.py?ds=sidebyside 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):