#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:             
Report Upstream:  N/A                  |     Reviewers:  Mike Hansen
        Authors:  Simon King           |     Merged in:             
   Dependencies:                       |      Stopgaps:             
---------------------------------------+------------------------------------

Comment (by SimonKing):

 Replying to [comment:9 robertwb]:
 > a_attrib will be defined after any non-empty loop even if it doesn't
 break with a match

 I don't understand that comment. a_attrib is used only in the few lines
 that I changed. And what loop are you talking about? The outer loop `for a
 in args:` (line 559)? But a_attrib is set to None at each round of the
 outer loop: See the new line 630.

 > I think that this interface is rather subtle, I'd rather have a
 compare_using_identiy=[True|False] keyword in the function (which will
 iterate over the dictionary rather than indexing into it).

 One could argue that by using the dictionary (i.e., the old syntax) you
 declare that you want comparison by equality rather than identity. And
 also note that in Singular you assign an attribute to an individual ideal;
 hence, I find it wrong that in Sage we assign the attributes to an
 equivalence class of ideal.

 > On that note, is indexing ever safe (do equal ideals always hash the
 same?)

 No, as mentioned in the ticket description, the hash is totally broken
 (#12976). Two polynomial ideals are equal if they have the same reduced
 Gröbner basis (computed in degrevlex order, if the GB for the "real" order
 ist not in the cache), but the hash relies on the given generators. That's
 why I support the old syntax only for backwards compatibility.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12977#comment:10>
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.

Reply via email to