On Sunday, March 14, 2021 at 2:46:18 PM UTC-7 Michael Orlitzky wrote:

> On Sun, 2021-03-14 at 04:42 -0700, Diego Sejas wrote: 
> > 2.If one defined "var('foo')", then overwrites it with "foo = 2", and 
> for 
> > some reason needs the symbol "foo" again, is there any meaningful 
> advantage 
> > in retrieving it from the cache "SR.symbols" instead of redefining it 
> again? 
>
> I think the answers to all of the other questions hinge on this one, 
> and personally, I don't know. I'm tempted to say "for speed" but I 
> really doubt that it is faster unless you're creating new symbols in a 
> tight loop (why?). 
>
> I'd say there's a benefit in that the symbol object is probably already 
kept alive in the interface dictionaries. It's better to have it available 
for reusing on python level, rather than create another python wrapper 
object that may or may not satisfy the equality properties that you'd want 
it to have. This is something that could be further investigated, though.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/b6317d26-56f3-4a62-9830-d682ac766d94n%40googlegroups.com.

Reply via email to