Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 25658d6

Browse files
committed
#28508 fix doctests for Python 3
1 parent 80df258 commit 25658d6

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/sage/structure/coerce.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ def parent_is_numerical(P):
377377
sage: [parent_is_numerical(R) for R in [RR, CC, QQ, QuadraticField(-1),
378378
....: int, complex, gmpy2.mpc, numpy.complexfloating]]
379379
[True, True, True, True, True, True, True, True]
380-
sage: [parent_is_numerical(R) for R in SR, QQ['x'], QQ[['x']], str]
380+
sage: [parent_is_numerical(R) for R in [SR, QQ['x'], QQ[['x']], str]]
381381
[False, False, False, False]
382-
sage: [parent_is_numerical(R) for R in RIF, RBF, CIF, CBF]
382+
sage: [parent_is_numerical(R) for R in [RIF, RBF, CIF, CBF]]
383383
[False, False, False, False]
384384
"""
385385
if not isinstance(P, Parent):
@@ -403,9 +403,9 @@ def parent_is_real_numerical(P):
403403
sage: [parent_is_real_numerical(R) for R in [CC, QuadraticField(-1),
404404
....: complex, gmpy2.mpc, numpy.complexfloating]]
405405
[False, False, False, False, False]
406-
sage: [parent_is_real_numerical(R) for R in SR, QQ['x'], QQ[['x']], str]
406+
sage: [parent_is_real_numerical(R) for R in [SR, QQ['x'], QQ[['x']], str]]
407407
[False, False, False, False]
408-
sage: [parent_is_real_numerical(R) for R in RIF, RBF, CIF, CBF]
408+
sage: [parent_is_real_numerical(R) for R in [RIF, RBF, CIF, CBF]]
409409
[False, False, False, False]
410410
"""
411411
if not isinstance(P, Parent):

src/sage/structure/parent.pyx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,11 +2701,11 @@ cdef class Parent(sage.structure.category_object.CategoryObject):
27012701
27022702
EXAMPLES::
27032703
2704-
sage: [R._is_numerical() for R in RR, CC, QQ, QuadraticField(-1)]
2704+
sage: [R._is_numerical() for R in [RR, CC, QQ, QuadraticField(-1)]]
27052705
[True, True, True, True]
2706-
sage: [R._is_numerical() for R in SR, QQ['x'], QQ[['x']]]
2706+
sage: [R._is_numerical() for R in [SR, QQ['x'], QQ[['x']]]]
27072707
[False, False, False]
2708-
sage: [R._is_numerical() for R in RIF, RBF, CIF, CBF]
2708+
sage: [R._is_numerical() for R in [RIF, RBF, CIF, CBF]]
27092709
[False, False, False, False]
27102710
"""
27112711
from sage.rings.complex_field import ComplexField
@@ -2720,13 +2720,13 @@ cdef class Parent(sage.structure.category_object.CategoryObject):
27202720
27212721
EXAMPLES::
27222722
2723-
sage: [R._is_real_numerical() for R in RR, QQ, ZZ, RLF, QuadraticField(2)]
2723+
sage: [R._is_real_numerical() for R in [RR, QQ, ZZ, RLF, QuadraticField(2)]]
27242724
[True, True, True, True, True]
2725-
sage: [R._is_real_numerical() for R in CC, QuadraticField(-1)]
2725+
sage: [R._is_real_numerical() for R in [CC, QuadraticField(-1)]]
27262726
[False, False]
2727-
sage: [R._is_real_numerical() for R in SR, QQ['x'], QQ[['x']]]
2727+
sage: [R._is_real_numerical() for R in [SR, QQ['x'], QQ[['x']]]]
27282728
[False, False, False]
2729-
sage: [R._is_real_numerical() for R in RIF, RBF, CIF, CBF]
2729+
sage: [R._is_real_numerical() for R in [RIF, RBF, CIF, CBF]]
27302730
[False, False, False, False]
27312731
"""
27322732
from sage.rings.real_mpfr import RealField, mpfr_prec_min

0 commit comments

Comments
 (0)