#12804: infinite loop in find method of a finite word
-------------------------------------+-------------------------------------
Reporter: slabbe | Owner: sage-combinat
Type: defect | Status: needs_info
Priority: major | Milestone: sage-6.6
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/12804 | 1b0cb8eaa64b8e11eafbb834682e1fa16b1e0f25
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by slabbe):
* status: needs_review => needs_info
Comment:
I like the way the fix is done. But by coercing the sub into the parent,
we may obtain a Value Error. Should we catch the Value Error and return -1
in this case?
{{{
sage: w = Words('ab')('babaabaaab')
sage: w.find('abc') # find is overwritten in WordDatatype_str
-1
sage:
sage: w = Words('ab')(tuple('babaabaaab'))
sage: w.find('abc')
Traceback (most recent call last):
...
ValueError: c not in alphabet!
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/12804#comment:13>
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.