difference between SR.symbol and SR.var

38 views
Skip to first unread message

Daniel Krenn

unread,
Apr 10, 2015, 5:09:31 PM4/10/15
to sage-s...@googlegroups.com
Can someone explain me the difference between SR.symbol and SR.var ?

(BTW: SR.symbol does not have a description)

Daniel

Michael Orlitzky

unread,
Apr 10, 2015, 5:12:59 PM4/10/15
to sage-s...@googlegroups.com
On 04/10/2015 05:09 PM, Daniel Krenn wrote:
> Can someone explain me the difference between SR.symbol and SR.var ?
>
> (BTW: SR.symbol does not have a description)
>

SR.symbol is faster, but only lets you declare one variable at a time.
SR.var will parse a string, so something like SR.var('x,y') will work,
but it's a tiny bit slower (thanks to the parsing).


Volker Braun

unread,
Apr 10, 2015, 6:03:17 PM4/10/15
to sage-s...@googlegroups.com
Common confusion. See also: http://trac.sagemath.org/ticket/17958

Daniel Krenn

unread,
Apr 10, 2015, 8:33:09 PM4/10/15
to sage-s...@googlegroups.com
Ok. What is the reason for not having only one function with a keyword
argment preparse=False (or similar) ? (historical?)

Daniel

Daniel Krenn

unread,
Apr 10, 2015, 8:50:52 PM4/10/15
to sage-s...@googlegroups.com
Am 2015-04-11 um 00:03 schrieb Volker Braun:
> Common confusion. See also: http://trac.sagemath.org/ticket/17958

Thanks.

Daniel

Nils Bruin

unread,
Apr 10, 2015, 10:31:19 PM4/10/15
to sage-s...@googlegroups.com
On Friday, April 10, 2015 at 5:33:09 PM UTC-7, Daniel Krenn wrote:
Ok. What is the reason for not having only one function with a keyword
argment preparse=False (or similar) ? (historical?)
My guess:

 var : user interface (historically and convenience motivated)
 symbol: tight wrapping of underlying pynac functionality (implementation motivated)


Reply all
Reply to author
Forward
0 new messages