#17086: GenericGraph's documentation, __eq__, and __hash__ out of sync
-------------------------------------+-------------------------------------
Reporter: emassop | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/emassop/graph_hash | a207b85b076036104911b312aa5639a0b135a2e0
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
> I can't understand "to you ... with '=='" here. The problem can occur
when an {{{is}}}-based ordering disagrees with {{{==}}}. This can still
happen when it is total.
Okayokay right. So it can happen even when the ordering is total, when
`==` does not agree with `<`. Or actually, it happens when `<` is not an
order at all.
> If sorted only uses {{{<}}} and not {{{==}}}, and if {{{<}}} is an
{{{is}}}-based total order, then {{{sorted(sorted(L)) == sorted(L)}}} is
indeed true. So someone should maybe check the implementation of
{{{sorted}}} to see what comparisons are used.
I expect that it only uses `<` or `<=`.
> > Well, I do not think it needs a different ticket. I was surprised, but
that's as bad as it got. If it is documented I don't see anything wrong
with it. Especially since `is_isomorphic` also ignores edges by default.
>
> Okay... your punctuation was a bit strange then: "This is *REALLY* bad !
Graphs with different labels should be non-equal !!! `O_O;;;;;`"
Well, I *did* freak out. But if it works as intended, no problem `:-P`
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/17086#comment:9>
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.