#13790: Allow SR.symbol() to return a tuple.
---------------------------+------------------------------------------------
Reporter: mjo | Owner: burcin
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.6
Component: symbolics | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
---------------------------+------------------------------------------------
The standard `var` function can return a tuple of symbols:
{{{
sage: a1,a2,a3 = var('a1,a2,a3')
}}}
But `SR.symbol()`, which is recommended for use in library code, cannot:
{{{
sage: a1,a2,a3 = SR.symbol('a1,a2,a3')
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/mjo/<ipython console> in <module>()
TypeError: 'sage.symbolic.expression.Expression' object is not iterable
}}}
For convenience and consistently, they should behave the same. There is a
slight possibility for backwards-incompatibility here, since `SR.symbol()`
will create a symbol with a comma in the name:
{{{
sage: foo = SR.symbol('a1,a2,a3')
sage: foo
a1,a2,a3
}}}
but hopefully, that's not actually used anywhere.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13790>
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.