@@ -143,7 +143,7 @@ def _an_element_(self):
143
143
else :
144
144
from sage .categories .sets_cat import EmptySetError
145
145
raise EmptySetError ("There is no morphism from {} to {}" .format (
146
- self .domain (), self .codomain ()))
146
+ self .domain (), self .codomain ()))
147
147
148
148
def _repr_ (self ):
149
149
r"""
@@ -238,7 +238,7 @@ def list(self):
238
238
v = [D .hom ([r ], codomain = C , check = False ) for r in roots ]
239
239
else :
240
240
v = []
241
- return Sequence (v , universe = self , check = False , immutable = True , cr = v != [] )
241
+ return Sequence (v , universe = self , check = False , immutable = True , cr = bool ( v ) )
242
242
243
243
def __getitem__ (self , n ):
244
244
r"""
@@ -389,7 +389,7 @@ def _element_constructor_(self, x, base_map=None, base_hom=None, check=True):
389
389
raise ValueError ("codomain of absolute homomorphism must be codomain of this homset." )
390
390
return self .element_class (self , x )
391
391
if (isinstance (x , RelativeNumberFieldHomomorphism_from_abs )
392
- and x .parent () == self ):
392
+ and x .parent () == self ):
393
393
return self .element_class (self , x .abs_hom ())
394
394
if base_map is None :
395
395
base_map = self .default_base_hom ()
@@ -519,7 +519,7 @@ def list(self):
519
519
C = self .codomain ()
520
520
D_abs = D .absolute_field ('a' )
521
521
v = [self (f , check = False ) for f in D_abs .Hom (C ).list ()]
522
- return Sequence (v , universe = self , check = False , immutable = True , cr = v != [] )
522
+ return Sequence (v , universe = self , check = False , immutable = True , cr = bool ( v ) )
523
523
524
524
525
525
class CyclotomicFieldHomset (NumberFieldHomset ):
@@ -579,7 +579,7 @@ def _element_constructor_(self, x, check=True):
579
579
x^2 + b
580
580
"""
581
581
if (isinstance (x , CyclotomicFieldHomomorphism_im_gens )
582
- and x .parent () == self ):
582
+ and x .parent () == self ):
583
583
return self .element_class (self , x .im_gens ())
584
584
return self .element_class (self , x , check = check )
585
585
@@ -622,4 +622,4 @@ def list(self):
622
622
else :
623
623
w = C .zeta (n )
624
624
v = [self ([w ** k ], check = False ) for k in Zmod (n ) if k .is_unit ()]
625
- return Sequence (v , universe = self , check = False , immutable = True , cr = v != [] )
625
+ return Sequence (v , universe = self , check = False , immutable = True , cr = bool ( v ) )
0 commit comments