[Scipy-tickets] [SciPy] #290: sparse.__cmp__ shoudn't exist

SciPy scipy-tickets at scipy.net
Tue Oct 17 22:38:22 CDT 2006


#290: sparse.__cmp__ shoudn't exist
--------------------------+-------------------------------------------------
 Reporter:  jpmague       |       Owner:  somebody                
     Type:  defect        |      Status:  new                     
 Priority:  normal        |   Milestone:  Statistics Review Months
Component:  scipy.sparse  |     Version:                          
 Severity:  trivial       |    Keywords:                          
--------------------------+-------------------------------------------------
 Here is what the Python Reference Manual says about __cmp__ :

 "Should return a negative integer if self < other, zero if self == other,
 a positive integer if self > other. If no __cmp__(), __eq__() or __ne__()
 operation is defined, class instances are compared by object identity
 (``address'')."

 The definition of a __cmp__ method, which does nothing bur raising an
 exception, prevents the identity-based comparaison to be done.
 Even if this comparaison is different from the mathematical comparaison,
 it may be better than nothing in some cases.

-- 
Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/290>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list