#14054: Cythoned UniqueRepresentation
-----------------------------------------------+----------------------------
       Reporter:  SimonKing                    |         Owner:  tbd            
 
           Type:  enhancement                  |        Status:  needs_review   
 
       Priority:  major                        |     Milestone:  sage-5.8       
 
      Component:  performance                  |    Resolution:                 
 
       Keywords:  cython UniqueRepresentation  |   Work issues:                 
 
Report Upstream:  N/A                          |     Reviewers:  Travis 
Scrimshaw
        Authors:  Simon King                   |     Merged in:                 
 
   Dependencies:  #14017                       |      Stopgaps:                 
 
-----------------------------------------------+----------------------------

Comment (by nbruin):

 What's your rationale to define 'a < b' etc. when `a is b`? I agree that
 it's likely that your answers are what any ordering override will want,
 but Python does not mandate any particular properties of semantics of
 these operators. So I think the proper thing is to just not do anything
 there. It's going to be a rare occasion anyway, so a little speed gain
 won't be very noticeable anyway.

 The behaviour you are implementing is much easier to explain if you don't
 override those cases: Then you can just say that `WithRichCmpById`
 provides `__hash__`, `__eq__` and `__ne__`, period.

 I think `WithEqualityById` would make a better conceptual name that is
 less dependent on the implementation, by the way. Your motivation here
 seems to be as much to provide conceptual units in preference of just
 technical implementation tools as to provide more efficient
 implementations. Someone writing a Python class may not know what
 "richcomp" is, and doesn't need to.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14054#comment:17>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to