#14780: allow embedding python tuples in SR
---------------------------+------------------------------------------------
   Reporter:  burcin       |             Owner:  burcin   
       Type:  enhancement  |            Status:  new      
   Priority:  major        |         Milestone:  sage-5.11
  Component:  symbolics    |          Keywords:           
Work issues:               |   Report Upstream:  N/A      
  Reviewers:               |           Authors:           
  Merged in:               |      Dependencies:           
   Stopgaps:               |  
---------------------------+------------------------------------------------
 Attached patch allows embedding Python tuples in symbolic expressions:

 {{{
 sage: t = SR._force_tuple((1, 2, x, x+1, x+2))
 sage: t
 (1, 2, x, x + 1, x + 2)
 sage: t.subs(x = 2*x^2)
 (1, 2, 2*x^2, 2*x^2 + 1, 2*x^2 + 2)
 sage: t.op[0]
 1
 sage: t.op[2]
 x
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14780>
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.


Reply via email to