#7520: Improving word construction
-----------------------------+----------------------------------------------
   Reporter:  slabbe         |       Owner:  mhansen   
       Type:  enhancement    |      Status:  needs_work
   Priority:  major          |   Milestone:  sage-4.3  
  Component:  combinatorics  |    Keywords:            
Work_issues:                 |      Author:            
   Upstream:  N/A            |    Reviewer:            
     Merged:                 |  
-----------------------------+----------------------------------------------
Changes (by slabbe):

  * status:  new => needs_work


Comment:

 My patch needs work:

 {{{
 sage: P = WordPaths([0,1,2,3])
 sage: P
 Word Paths on the square grid
 sage: w = words.ChristoffelWord(5,8)
 sage: P(w)
 Traceback (most recent call last):
 ...
 AttributeError: 'LowerChristoffelWord' object has no attribute
 '_class_str'
 }}}

 I must admit my patch was not that clean and it now shows its limits. The
 problem concerns the creation of a word from a word especially when the
 parent changes. Should we try to use some sort of shorcut (like simply
 change some important attributes like `__class__`) or not? I have an idea
 of something better which doesn't use any shortcut. For example, if the
 input word is a `FiniteWord_list`, we could simply restore the list and
 pass through the usual steps for when the input is a list. I think this
 should be more safe. I just have to think for a solution what we do when
 the word is defined as an iterator. A new patch (with cleaner code) to be
 posted soon.

 Ideas are welcome.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7520#comment:3>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to