#19619: Simplify words.py
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers: Sébastien Labbé
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/19619 | 13e989e3ab16bcda4980b69d7f6afd65ab46b318
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:47 slabbe]:
> I would prefer if the code of `FiniteOrInfiniteWords.__call__` be like
the others `FiniteWords.__call__` and `InfiniteWords.__call__` in the
sense that first the function does:
>
> {{{ <SNIP> }}}
>
> if you agree. It makes the code easier to read and be convince anybody
that it does the minimal and most efficient path in the function.
>
> Doing what you do in `InfiniteWords.__call__` essentially reverts ticket
#17021 where that kind of guessing was done first. Note that to avoid
duplication of code, it is possible that you will have to recreate
`_word_from_callable` because of that... or maybe not.
If a user provides `datatype` '''and''' `length` there will be no
guessing... And with what I changed the first step is to determine the
length (in order to determine the parent). I do not see how to handle what
you suggested without copy/paste.
--
Ticket URL: <http://trac.sagemath.org/ticket/19619#comment:48>
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.