#12977: Let singular_function expect "attributes" not as a dict
---------------------------------------+------------------------------------
Reporter: SimonKing | Owner: malb
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.1
Component: commutative algebra | Resolution:
Keywords: sd40.5 | Work issues: Do not set a_attrib
accidentally. Provide a flag for "comparison by equality"
Report Upstream: N/A | Reviewers: Mike Hansen
Authors: Simon King | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Changes (by SimonKing):
* status: needs_review => needs_work
* work_issues: => Do not set a_attrib accidentally. Provide a flag for
"comparison by equality"
Comment:
Replying to [comment:12 robertwb]:
> {{{
> 634 for a_,a_attrib in attributes:
> 635 if a_ is a:
> 636 break
> }}}
>
> If the {{{a_ is a}}} clause is never executed, the loop will run to
completion and {{{a_attrib}}} will have the value {{{attributes[-1][1]}}}
unless attributes happens to be empty.
I see. Right, that has to be fixed.
> Are you against having an explicit flag?
I think the default should be "comparison by identity", because I am sure
that this is how the attributes argument is intended to be used.
I also think that (for backwards compatibility) one should still support
the old syntax, for which "comparison by Gröbner basis computation and
broken hash" is implicit.
And I think that there is no harm in providing an explicit flag if one
wants the new syntax with a "comparison by Gröbner bass computation but
without broken hash involved since there is a list and not a dictionary of
ideal-attribute pairs".
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12977#comment:13>
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.