]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: use single-underscore method names for morphisms.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 26 Jul 2019 20:58:23 +0000 (16:58 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 29 Jul 2019 03:19:01 +0000 (23:19 -0400)
mjo/eja/euclidean_jordan_algebra.py

index 304d7ff7b9298aa98763e210f565f83e3893b791..9414d2cf27fd2728ef205650b128ab37d1b83949 100644 (file)
@@ -39,7 +39,7 @@ class FiniteDimensionalEuclideanJordanAlgebraMorphism(FiniteDimensionalAlgebraMo
     our EJA, and you can't add/multiply/etc. them.
     """
 
-    def __add__(self, other):
+    def _add_(self, other):
         """
         Add two EJA morphisms in the obvious way.
 
@@ -86,7 +86,7 @@ class FiniteDimensionalEuclideanJordanAlgebraMorphism(FiniteDimensionalAlgebraMo
                                                   check=False)
 
 
-    def __invert__(self):
+    def _invert_(self):
         """
         EXAMPLES::
 
@@ -124,7 +124,7 @@ class FiniteDimensionalEuclideanJordanAlgebraMorphism(FiniteDimensionalAlgebraMo
         return FiniteDimensionalEuclideanJordanAlgebraMorphism(self.parent(),
                                                                 A.inverse())
 
-    def __mul__(self, other):
+    def _lmul_(self, other):
         """
         Compose two EJA morphisms using multiplicative notation.
 
@@ -162,7 +162,7 @@ class FiniteDimensionalEuclideanJordanAlgebraMorphism(FiniteDimensionalAlgebraMo
                   self.matrix()*other.matrix() )
 
 
-    def __neg__(self):
+    def _neg_(self):
         """
         Negate this morphism.