On 3/18/11 2:38 PM, Robert Miller wrote:
Dear Ryan,
On Thu, Mar 17, 2011 at 8:34 PM, Ryan Hinton<iob...@email.com> wrote:
Where are the comparison operators for graphs implemented? I can find
``__eq__`` in graphs/generic_graph.py, but I can't find any others.
There is also __ne__.
Comparison was implemented in Sage for a while, but we changed from
using __cmp__ to using __eq__ and __ne__ in #2433 (March 2008). You
may remember #2506 as fallout of this patch. This was originally
requested in #729, and erroneously that ticket points to #749 as its
duplication-- #749 in fact does not replace the __cmp__ function.
The patch at #2433 is simply a link (to an extinct file) because the
file was too big to upload-- this was a major overhaul ticket. For the
full changeset, see the mercurial repo:
http://hg.sagemath.org/sage-main/rev/dbe53cb3e5f7
I still feel like it is silly to implement six different functions
instead of a __cmp__ function. Why was it ever suggested that this
should change in the first place? I think we should certainly support
some arbitrary total ordering on graphs, and I don't see why it
shouldn't be via a __cmp__ function.
Jason-- You originally requested this. Why?
It looks like our discussion about why is up at
http://trac.sagemath.org/sage_trac/ticket/729
Thanks,
Jason
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org