Commits (2)
......@@ -816,8 +816,6 @@ class ChartFunction(AlgebraElement, ModuleElementWithMutability):
val = self.expr(curr).is_zero
return not val
__nonzero__ = __bool__ # For Python2 compatibility
def is_trivial_zero(self):
r"""
Check if ``self`` is trivially equal to zero without any
......
......@@ -540,8 +540,6 @@ class MixedForm(AlgebraElement):
self._is_zero = True
return False
__nonzero__ = __bool__ # For Python2 compatibility
def _richcmp_(self, other, op):
r"""
Comparison method for sage objects.
......
......@@ -544,8 +544,6 @@ class TensorField(ModuleElementWithMutability):
self._is_zero = True
return False
__nonzero__ = __bool__ # For Python2 compatibility
##### End of required methods for ModuleElement (beside arithmetic) #####
def _repr_(self):
......
......@@ -1192,8 +1192,6 @@ class ScalarField(CommutativeAlgebraElement, ModuleElementWithMutability):
self._is_zero = True
return False
__nonzero__ = __bool__ # For Python2 compatibility
def is_trivial_zero(self):
r"""
Check if ``self`` is trivially equal to zero without any
......
......@@ -298,8 +298,6 @@ class Section(ModuleElementWithMutability):
self._is_zero = True
return False
__nonzero__ = __bool__ # For Python2 compatibility
##### End of required methods for ModuleElement (beside arithmetic) #####
def _repr_(self):
......
......@@ -488,8 +488,6 @@ class FiniteRankFreeModuleMorphism(Morphism):
matrix_rep = next(iter(self._matrices.values()))
return not matrix_rep.is_zero()
__nonzero__ = __bool__
def _add_(self, other):
r"""
Homomorphism addition.
......
......@@ -376,8 +376,6 @@ class FreeModuleTensor(ModuleElementWithMutability):
self._is_zero = True
return False
__nonzero__ = __bool__
##### End of required methods for ModuleElement (beside arithmetic) #####
def _repr_(self):
......@@ -1506,7 +1504,8 @@ class FreeModuleTensor(ModuleElementWithMutability):
[Basis (e_1,e_2,e_3) on the Rank-3 free module M over the Integer Ring]
"""
if basis is None: basis = self._fmodule._def_basis
if basis is None:
basis = self._fmodule._def_basis
if basis not in self._components:
raise ValueError("the components w.r.t. the {}".format(basis) +
" have not been defined")
......