@@ -671,7 +671,7 @@ def _evalf_(self, n, x, **kwds):
671
671
except KeyError :
672
672
real_parent = parent (x )
673
673
674
- if not isinstance (real_parent , sage .rings .abc .RealField ) and not isinstance ( real_parent , sage .rings .abc .ComplexField ):
674
+ if not isinstance (real_parent , ( sage .rings .abc .RealField , sage .rings .abc .ComplexField ) ):
675
675
# parent is not a real or complex field: figure out a good parent
676
676
if x in RR :
677
677
x = RR (x )
@@ -680,7 +680,7 @@ def _evalf_(self, n, x, **kwds):
680
680
x = CC (x )
681
681
real_parent = CC
682
682
683
- if not isinstance (real_parent , sage .rings .abc .RealField ) and not isinstance ( real_parent , sage .rings .abc .ComplexField ):
683
+ if not isinstance (real_parent , ( sage .rings .abc .RealField , sage .rings .abc .ComplexField ) ):
684
684
raise TypeError ("cannot evaluate chebyshev_T with parent {}" .format (real_parent ))
685
685
686
686
from sage .libs .mpmath .all import call as mpcall
@@ -1030,7 +1030,7 @@ def _evalf_(self, n, x, **kwds):
1030
1030
except KeyError :
1031
1031
real_parent = parent (x )
1032
1032
1033
- if not isinstance (real_parent , sage .rings .abc .RealField ) and not isinstance ( real_parent , sage .rings .abc .ComplexField ):
1033
+ if not isinstance (real_parent , ( sage .rings .abc .RealField , sage .rings .abc .ComplexField ) ):
1034
1034
# parent is not a real or complex field: figure out a good parent
1035
1035
if x in RR :
1036
1036
x = RR (x )
@@ -1039,7 +1039,7 @@ def _evalf_(self, n, x, **kwds):
1039
1039
x = CC (x )
1040
1040
real_parent = CC
1041
1041
1042
- if not isinstance (real_parent , sage .rings .abc .RealField ) and not isinstance ( real_parent , sage .rings .abc .ComplexField ):
1042
+ if not isinstance (real_parent , ( sage .rings .abc .RealField , sage .rings .abc .ComplexField ) ):
1043
1043
raise TypeError ("cannot evaluate chebyshev_U with parent {}" .format (real_parent ))
1044
1044
1045
1045
from sage .libs .mpmath .all import call as mpcall
0 commit comments