#15480: Words.__eq__ returns wrong answers
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_review
Type: | Milestone: sage-5.13
defect | Resolution:
Priority: major | Merged in:
Component: | Reviewers:
combinatorics | Work issues:
Keywords: | Commit:
Authors: | ad1cb6306d1dd48b2aa91c92ca00bf10fe1430b2
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/15480 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by ncohen):
I did not know the existence of WordPaths either before this patch, but I
think this has been done on purpose for there are 4 doctests in the
`__eq__` function that test this kind of equalities. So it's not just a
result of the code, it seems to be somebody wanted to get there. But
that's just guessing.
As per the cardinality test I tried to avoid calling `self.cardinality()`
twice. I was wondering if this could be costly from time to time, but it's
defintely prettier without this caching, so if you think it's overkill
let's rewrite it as you did as I cannot produce an word where
`.cardinality()` takes time.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/15480#comment:6>
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/groups/opt_out.