#19619: Simplify words.py
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  defect             |       Status:  needs_work
       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                 |  fa5ef782448a49b2b3b141b5d91a9ec44ba38064
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by slabbe):

 * status:  needs_review => needs_work


Comment:

 I think this comment inside `FiniteWords._word_from_word`

 {{{
 +            # this must be put first for the reason that
 CallableFromListOfWords
 +            # inherits from tuple
 }}}

 is unnecessary and date from the time were one method was doing everything
 for the creation of a word. Then, data could be a tuple or a
 `CallableFromListOfWords` which inherits from tuple explaining the reason
 we needed to test for `isinstance(data, CallableFromListOfWords)` first.

 Now, in that method, data is word (not a tuple neither a
 `CallableFromListOfWords`) so the isinstance tests can be done in any
 order. Question: what is best to test first?

--
Ticket URL: <http://trac.sagemath.org/ticket/19619#comment:41>
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.

Reply via email to