#10130: Revamp __hash__, __cmp__ and __richcmp__
---------------------------+------------------------------------------------
   Reporter:  roed         |       Owner:  robertwb
       Type:  enhancement  |      Status:  new     
   Priority:  major        |   Milestone:  sage-4.7
  Component:  coercion     |    Keywords:          
     Author:               |    Upstream:  N/A     
   Reviewer:               |      Merged:          
Work_issues:               |  
---------------------------+------------------------------------------------

Comment(by nthiery):

 Just a quick note: for parents that use UniqueRepresentation, the hash is
 given by the id of the object; one can't be much faster (except that
 UniqueRepresentation is not Cython'ed yet):

 {{{

    F = CombinatorialFreeModule(QQ,QQ)
    sage: F.__hash__()
    98169392
    sage: id(F)
    98169392
 }}}

 Other than that, I am all for improvements in this direction, because at
 this stage I am still confused about what I should do when I want to
 implement a partially ordered set in Python. Besides it would be best if
 it was possible to implement such partial orders in categories (remember
 that element methods defined in categories are overridden by methods
 defined in concrete classes like Element).

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