#14780: allow embedding python tuples in SR
---------------------------------+----------------------------
Reporter: burcin | Owner: burcin
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.13
Component: symbolics | Resolution:
Keywords: sd48 | Merged in:
Authors: Burcin Erocal | Reviewers: Volker Braun
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------------+----------------------------
Changes (by jdemeyer):
* status: positive_review => needs_work
Comment:
On the buildbot machine `redhawk` (Ubuntu 10.04 x86_64):
{{{
sage -t --long devel/sage/sage/symbolic/ring.pyx
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 317, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
t = SR._force_pyobject((1, 2, x, x+1, x+2)); t
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest sage.symbolic.ring.SymbolicRing._force_pyobject[2]>",
line 1, in <module>
t = SR._force_pyobject((Integer(1), Integer(2), x, x+Integer(1),
x+Integer(2))); t
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 319, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
t.subs(x = 2*x^2)
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest sage.symbolic.ring.SymbolicRing._force_pyobject[3]>",
line 1, in <module>
t.subs(x = Integer(2)*x**Integer(2))
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 328, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
t = SR._force_pyobject([1, 2, x, x+1, x+2]); t
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest sage.symbolic.ring.SymbolicRing._force_pyobject[6]>",
line 1, in <module>
t = SR._force_pyobject([Integer(1), Integer(2), x, x+Integer(1),
x+Integer(2)]); t
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 330, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
t.subs(x = 2*x^2)
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest sage.symbolic.ring.SymbolicRing._force_pyobject[7]>",
line 1, in <module>
t.subs(x = Integer(2)*x**Integer(2))
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 332, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
SR._force_pyobject((QQ, RR, CC))
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest sage.symbolic.ring.SymbolicRing._force_pyobject[8]>",
line 1, in <module>
SR._force_pyobject((QQ, RR, CC))
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 334, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
t = SR._force_pyobject((QQ, (x, x + 1, x + 2), CC)); t
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest sage.symbolic.ring.SymbolicRing._force_pyobject[9]>",
line 1, in <module>
t = SR._force_pyobject((QQ, (x, x + Integer(1), x + Integer(2)),
CC)); t
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 336, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
t.subs(x=x^2)
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest
sage.symbolic.ring.SymbolicRing._force_pyobject[10]>", line 1, in <module>
t.subs(x=x**Integer(2))
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 343, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
t
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest
sage.symbolic.ring.SymbolicRing._force_pyobject[12]>", line 1, in <module>
t
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
File "devel/sage/sage/symbolic/ring.pyx", line 346, in
sage.symbolic.ring.SymbolicRing._force_pyobject
Failed example:
t.subs(x=x^2)
Exception raised:
Traceback (most recent call last):
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 479, in _run
self.execute(example, compiled, test.globs)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 838, in execute
exec compiled in globs
File "<doctest
sage.symbolic.ring.SymbolicRing._force_pyobject[13]>", line 1, in <module>
t.subs(x=x**Integer(2))
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File
"/scratch/buildbot/sage/redhawk-1/redhawk_full/build/sage-5.13.rc0/local/lib/python2.7
/site-packages/sage/misc/displayhook.py", line 451, in __call__
self.oldhook(obj)
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1921)
File "expression.pyx", line 521, in
sage.symbolic.expression.Expression._repr_
(sage/symbolic/expression.cpp:4629)
File "ring.pyx", line 666, in
sage.symbolic.ring.SymbolicRing._repr_element_
(sage/symbolic/ring.cpp:7670)
TypeError: std::bad_cast
**********************************************************************
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/14780#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.