Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is not a complete answer, but here are some useful methods of the symbolic ring and elements for retrieving wrapped python objects:

sage: a=SR(Mod(8,3))
sage: a
sage: type(a)
<type 'sage.symbolic.expression.Expression'>
sage: type(a.pyobject())
<type 'sage.rings.finite_rings.integer_mod.IntegerMod_int'>
sage: b=SR._force_pyobject('test')
sage: b
sage: type(b)
<type 'sage.symbolic.expression.Expression'>
sage: type(b.pyobject())
<type 'str'>