From e5f93250b4e2711f18c413cca65a1572bffec97c Mon Sep 17 00:00:00 2001 From: Marc Mezzarobba Date: Sat, 17 Oct 2020 11:39:41 +0200 Subject: [PATCH] #18036 doctest updates: I.pyobject() --- src/sage/categories/rings.py | 2 -- src/sage/libs/pynac/pynac.pyx | 10 +++++----- src/sage/symbolic/expression.pyx | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/sage/categories/rings.py b/src/sage/categories/rings.py index 9a1acdd02ac..79b655afb8b 100644 --- a/src/sage/categories/rings.py +++ b/src/sage/categories/rings.py @@ -1054,8 +1054,6 @@ def __getitem__(self, arg): Embeddings:: - sage: QQ[I](I.pyobject()) - I sage: a = 10^100; expr = (2*a + sqrt(2))/(2*a^2-1) sage: QQ[expr].coerce_embedding() is None False diff --git a/src/sage/libs/pynac/pynac.pyx b/src/sage/libs/pynac/pynac.pyx index 966a724409a..e99a02b38bb 100644 --- a/src/sage/libs/pynac/pynac.pyx +++ b/src/sage/libs/pynac/pynac.pyx @@ -1174,9 +1174,9 @@ def py_is_crational_for_doctest(x): True sage: py_is_crational_for_doctest(1.5) False - sage: py_is_crational_for_doctest(I.pyobject()) + sage: py_is_crational_for_doctest(I) True - sage: py_is_crational_for_doctest(I.pyobject()+1/2) + sage: py_is_crational_for_doctest(I+1/2) True """ return py_is_crational(x) @@ -1310,11 +1310,11 @@ def py_is_cinteger_for_doctest(x): sage: from sage.libs.pynac.pynac import py_is_cinteger_for_doctest sage: py_is_cinteger_for_doctest(1) True - sage: py_is_cinteger_for_doctest(I.pyobject()) + sage: py_is_cinteger_for_doctest(I) True - sage: py_is_cinteger_for_doctest(I.pyobject() - 3) + sage: py_is_cinteger_for_doctest(I - 3) True - sage: py_is_cinteger_for_doctest(I.pyobject() + 1/2) + sage: py_is_cinteger_for_doctest(I + 1/2) False """ return py_is_cinteger(x) diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx index 48bcf01e6a7..bda7ceb329c 100644 --- a/src/sage/symbolic/expression.pyx +++ b/src/sage/symbolic/expression.pyx @@ -255,7 +255,7 @@ This example is from :trac:`10833`:: Check if :trac:`10849` is fixed:: - sage: t = I.pyobject().parent()(-1/2) + sage: t = I.parent()(-1/2) sage: t > 0 False sage: t = I*x-1/2; t