#13790: Allow SR.symbol() to return a tuple.
-------------------------------+--------------------------------------------
       Reporter:  mjo          |         Owner:  burcin  
           Type:  enhancement  |        Status:  new     
       Priority:  major        |     Milestone:  sage-5.6
      Component:  symbolics    |    Resolution:          
       Keywords:               |   Work issues:          
Report Upstream:  N/A          |     Reviewers:          
        Authors:               |     Merged in:          
   Dependencies:               |      Stopgaps:          
-------------------------------+--------------------------------------------

Comment (by nbruin):

 -1: we already have `SR.var` for that.

 I'm pretty sure that `SR.symbol` is recommended in library code
 specifically ''because'' its return type does not depend on the presence
 of `,` in the input string. That makes it much easier to deal with its
 results in a programmatic manner.

 In general, you want as a primitive an absolutely basic access function to
 infrastructure (`SR.symbol`) that does minimal processing on input and is
 completely regular in its output. If it turns out certain usage patterns
 arise again and again, one can introduce convenience wrappers (which are
 easy to write ''beause'' the primitive is so regular):
 {{{
 map(SR.symbol,('a','b','c'))
 }}}
 which got wrapped as
 {{{
 map(SR.symbol,'a,b,c'.split(','))
 }}}
 because people were probably hesitant about making `var` variadic and/or
 didn't know that could be done while keeping keyword-only parameters as
 well and/or didn't like typing the extra quotes involved.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13790#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to