#19084: libSingular functions' ring parameter defaults to the last used ring
-------------------------------------+-------------------------------------
Reporter: klee | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-6.9
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: Kwankyu Lee | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/klee/libsingular | f4d7ffc4e5499913919ec6c8efe4140b91502134
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nbruin):
Could you just change the initial assignment to `last_ring` to
{{{
last_ring=PolynomialRing(QQ,"dummy",1)
}}}
and ''not'' update `last_ring`? Perhaps rename the global variable to
`dummy_ring` too.
There are some reasons why using a dedicated dummy ring might be nicer
than reusing arbitrary objects for the purpose:
- by making global links to arbitrary objects, where the global link has
a rather unpredictable lifetime, you're making garbage collection and
detection of memory leaks harder.
- you're making a link to a globally unique object. In principle, you're
allowed to do so, but this can have very subtle effects on the system,
because it can change the minimal lifetime of all kinds of related
objects. So for the sake of sanity in debugging elsewhere, it might be
better to not do this.
A pro of your current approach is that you might avoid having to create a
dummy ring, thus saving the slight memory penalty for it.
--
Ticket URL: <http://trac.sagemath.org/ticket/19084#comment:3>
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/d/optout.