#15904: Defining __eq__ without defining __ne__ or __cmp__: sage/combinat
-------------------------------------------------+-------------------------
       Reporter:  darij                          |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-6.2
      Component:  combinatorics                  |   Resolution:
       Keywords:  sage-combinat, equality,       |    Merged in:
  inheritance                                    |    Reviewers:
        Authors:                                 |  Work issues:
Report Upstream:  N/A                            |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by nthiery):

 Replying to [comment:3 darij]:
 > I'm not sure if TestSuite is always applicable in such cases -- e.g.
 what should I apply TestSuite to in order to see the issue with `Core`?

 On the parent. The methods `_test_elements_eq` and friends from the
 Sets.ParentMethods category
 does this kind of checks, and it will be interesting to see if the
 heuristics there are enough to catch some or all of what you detected. If
 not, it can be a good occasion to invent new heuristics :-)

 > Redefining `CombinatorialObject.__ne__` might come with a little speed
 penalty, but I guess it translates into either a bugfix or a speedup in
 most classes inheriting from `CombinatorialObject` because those redefine
 `__eq__` to something either more correct or faster.

 +1.

 > This wouldn't, however, solve all the issues here. For example,
 `ContreTableaux` only inherits from `Parent` (BTW: why does
 `ContreTableaux.category()` raise a TypeError?), while
 `CombinatorialSpecies` inherits from `SageObject`, etc.

 Yup. I have always been of the opinion that SageObject should really be
 handling this for us; but if I recall correctly there are some Python
 versus Cython classes issues, since the protocol varies slightly from one
 to the other.

 Cheers,
                               Nicolas

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

Reply via email to