#12224: Language as parent / Word as element
-----------------------------------------------------------------+----------
       Reporter:  vdelecroix                                     |         
Owner:  vdelecroix
           Type:  enhancement                                    |        
Status:  new       
       Priority:  major                                          |     
Milestone:  sage-5.6  
      Component:  combinatorics                                  |    
Resolution:            
       Keywords:  word, language, symbolic dynamics              |   Work 
issues:            
Report Upstream:  N/A                                            |     
Reviewers:            
        Authors:  Vincent Delecroix                              |     Merged 
in:            
   Dependencies:  #8920, #12230, #12518, #13778, #13956, #13957  |      
Stopgaps:            
-----------------------------------------------------------------+----------

Comment (by slabbe):

 4 (bis). Continuing point 4 above (testing doctests in the clean sage-main
 branch of sage-5.6.rc0 to see how the old behavior is changed). For now, I
 tested only {{{sage/combinat}}} folder. All tests pass on many of them. I
 get errors on 28 files and time out on 3 files. See below for the list of
 files.

 Below, I put some samples of failing doctests that will break my code and
 code of other users. These must be fixed. I can't see an argument for
 removing a working method from Sage...

 {{{
 ~/Applications/sage-5.6.rc0/devel/sage-main/sage/combinat $ sage -t *

 [...]

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t  "devel/sage-main/sage/combinat/debruijn_sequence.pyx"
         sage -t  "devel/sage-main/sage/combinat/e_one_star.py"
         sage -t  "devel/sage-main/sage/combinat/free_module.py"
         sage -t  "devel/sage-main/sage/combinat/iet/constructors.py"
         sage -t  "devel/sage-main/sage/combinat/iet/labelled.py"
         sage -t  "devel/sage-main/sage/combinat/iet/reduced.py"
         sage -t  "devel/sage-main/sage/combinat/iet/template.py"
         sage -t  "devel/sage-main/sage/combinat/lyndon_word.py"
         sage -t  "devel/sage-main/sage/combinat/ribbon.py"
         sage -t  "devel/sage-main/sage/combinat/ribbon_tableau.py"
         sage -t  "devel/sage-main/sage/combinat/sf/ns_macdonald.py"
         sage -t  "devel/sage-main/sage/combinat/skew_tableau.py"
         sage -t  "devel/sage-main/sage/combinat/tableau.py"
         sage -t  "devel/sage-main/sage/combinat/tableau_tuple.py"
         sage -t  "devel/sage-main/sage/combinat/words/abstract_word.py"
         sage -t  "devel/sage-main/sage/combinat/words/alphabet.py" # Time
 out
         sage -t  "devel/sage-main/sage/combinat/words/finite_word.py"
         sage -t  "devel/sage-main/sage/combinat/words/infinite_word.py"
         sage -t  "devel/sage-main/sage/combinat/words/morphism.py" # Time
 out
         sage -t  "devel/sage-main/sage/combinat/words/paths.py"
         sage -t  "devel/sage-main/sage/combinat/words/shuffle_product.py"
         sage -t  "devel/sage-main/sage/combinat/words/suffix_trees.py"
         sage -t  "devel/sage-main/sage/combinat/words/word.py"
         sage -t  "devel/sage-main/sage/combinat/words/word_datatypes.pyx"
         sage -t  "devel/sage-main/sage/combinat/words/word_generators.py"
 # Time out
         sage -t  "devel/sage-
 main/sage/combinat/words/word_infinite_datatypes.py"
         sage -t  "devel/sage-main/sage/combinat/words/word_options.py"
         sage -t  "devel/sage-main/sage/combinat/words/words.py"
 Total time for all tests: 2640.3 seconds
 }}}



 {{{
 sage -t  "devel/sage-main/sage/combinat/debruijn_sequence.pyx"
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/debruijn_sequence.pyx", line 18:
     sage: print Word(seq).string_rep()
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_0[4]>", line 1, in <module>
         print Word(seq).string_rep()###line 18:
     sage: print Word(seq).string_rep()
       File "element.pyx", line 332, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:3527)
       File "misc.pyx", line 204, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1488)
     AttributeError: 'sage.combinat.words.word_datatypes.FiniteWord_list'
 object has no attribute 'string_rep'
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/debruijn_sequence.pyx", line 21:
     sage: for i in range(2**3):
          print (Word(map(lambda (j,b): b if j in shift(i) else '*',
                                           enumerate(seq))).string_rep())
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_0[6]>", line 3, in <module>
         enumerate(seq))).string_rep())
       File "element.pyx", line 332, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:3527)
       File "misc.pyx", line 204, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1488)
     AttributeError: 'sage.combinat.words.word_datatypes.FiniteWord_list'
 object has no attribute 'string_rep'
 **********************************************************************
 1 items had failures:
    2 of   9 in __main__.example_0
 ***Test Failed*** 2 failures.

 }}}

 Why the comma is removed in the following representation of WordMorphism?

 {{{
 sage -t  "devel/sage-main/sage/combinat/e_one_star.py"
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/e_one_star.py", line 178:
     sage: E
 Expected:
     E_1^*(1->12, 10->1,11, 11->1,12, 12->1, 2->13, 3->14, 4->15, 5->16,
 6->17, 7->18, 8->19, 9->1,10)
 Got:
     E_1^*(1->1.2 2->1.3 3->1.4 4->1.5 5->1.6 ...)
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/e_one_star.py", line 1442:
     sage: E
 Expected:
     E_1^*(1->12, 2->13, 3->1)
 Got:
     E_1^*(1->12 2->13 3->1)
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/e_one_star.py", line 1572:
     sage: E1Star(s) * E1Star(t)
 Expected:
     E_1^*(1->1, 2->1132, 3->1311)
 Got:
     E_1^*(1->1 2->1132 3->1311)
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/e_one_star.py", line 1574:
     sage: E1Star(t * s)
 Expected:
     E_1^*(1->1, 2->1132, 3->1311)
 Got:
     E_1^*(1->1 2->1132 3->1311)
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/e_one_star.py", line 1590:
     sage: E
 Expected:
     E_1^*(1->12, 2->13, 3->1)
 Got:
     E_1^*(1->12 2->13 3->1)
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/e_one_star.py", line 1668:
     sage: E.sigma()
 Expected:
     WordMorphism: 1->12, 2->13, 3->1
 Got:
     1->12 2->13 3->1
 **********************************************************************
 5 items had failures:
    1 of  51 in __main__.example_0
    1 of   7 in __main__.example_37
    2 of   8 in __main__.example_40
    1 of   7 in __main__.example_41
    1 of   7 in __main__.example_45
 ***Test Failed*** 6 failures.
 For whitespace errors, see the file
 /Users/slabbe/.sage//tmp/e_one_star_12815.py
          [11.6 s]

 }}}

 So {{{a.b.c}}} is the new way of printing words?

 {{{
 sage -t  "devel/sage-main/sage/combinat/free_module.py"
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/free_module.py", line 785:
     sage: (1+q)*V(w)
 Expected:
     (q+1)*B[word: abc]
 Got:
     (q+1)*B[a.b.c]
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/free_module.py", line 787:
     sage: ((1+q)/q)*V(w)
 Expected:
     ((q+1)/q)*B[word: abc]
 Got:
     ((q+1)/q)*B[a.b.c]
 **********************************************************************
 1 items had failures:
    2 of  27 in __main__.example_24
 ***Test Failed*** 2 failures.
 For whitespace errors, see the file
 /Users/slabbe/.sage//tmp/free_module_12843.py
          [5.3 s]

 }}}

 I don't agree with the new printing of WordMorphism. We changed it and had
 a discussion recently in #13677. Why should we change it again? Anyway,
 this discussion is independant of this ticket. I suggest this is not
 changed by this ticket and is discussed elsewhere.

 {{{
 sage -t  "devel/sage-main/sage/combinat/iet/constructors.py"
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/iet/constructors.py", line 729:
     sage: s
 Expected:
     WordMorphism: a->acbbc, b->acbbcbbc, c->acbc
 Got:
     a->acbbc b->acbbcbbc c->acbc
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/iet/constructors.py", line 749:
     sage: w1
 Expected:
     word: acbbcacbcacbbcbbcacb
 Got:
     acbbcacbcacbbcbbcacb
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/iet/constructors.py", line 752:
     sage: w2[:20]
 Expected:
     word: acbbcacbcacbbcbbcacb
 Got:
     acbbcacbcacbbcbbcacb
 **********************************************************************
 1 items had failures:
    3 of  33 in __main__.example_5
 ***Test Failed*** 3 failures.
 For whitespace errors, see the file
 /Users/slabbe/.sage//tmp/constructors_12870.py
          [4.8 s]

 }}}

 Why does {{{LyndonWords()}}} does not work anymore  ?

 {{{
 sage -t  "devel/sage-main/sage/combinat/lyndon_word.py"
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/lyndon_word.py", line 59:
     sage: LyndonWords()
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_1[2]>", line 1, in <module>
         LyndonWords()###line 59:
     sage: LyndonWords()
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/combinat/lyndon_word.py", line 109, in LyndonWords
         raise NotImplementedError
     NotImplementedError
 **********************************************************************

 [...]

 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/lyndon_word.py", line 117:
     sage: LyndonWord([1,2,2])
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_2[2]>", line 1, in <module>
         LyndonWord([Integer(1),Integer(2),Integer(2)])###line 117:
     sage: LyndonWord([1,2,2])
     NameError: name 'LyndonWord' is not defined
 **********************************************************************

 }}}

 Methods disappeared :

 {{{
 sage -t  "devel/sage-main/sage/combinat/words/abstract_word.py"
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/abstract_word.py", line 17:
     sage: p = f.longest_common_prefix(g, length='finite')
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_0[5]>", line 1, in <module>
         p = f.longest_common_prefix(g, length='finite')###line 17:
     sage: p = f.longest_common_prefix(g, length='finite')
       File "element.pyx", line 332, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:3527)
       File "misc.pyx", line 200, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1406)
     AttributeError: 'RightInfiniteWord_iterable_with_category' object has
 no attribute 'longest_common_prefix'
 **********************************************************************
 [...]

 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/abstract_word.py", line 45:
     sage: Word(iter([1,2,3]), length="unknown").parent()
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_1[2]>", line 1, in <module>
         Word(iter([Integer(1),Integer(2),Integer(3)]),
 length="unknown").parent()###line 45:
     sage: Word(iter([1,2,3]), length="unknown").parent()
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/combinat/words/word.py", line 262, in Word
         return parent(data, **options)
       File "parent.pyx", line 809, in
 sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7408)
       File "coerce_maps.pyx", line 100, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args
 (sage/structure/coerce_maps.c:4004)
       File "coerce_maps.pyx", line 90, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args
 (sage/structure/coerce_maps.c:3816)
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/combinat/words/words.py", line 1700, in
 _element_constructor_
         return self.finite_words()(data, **options)
       File "parent.pyx", line 809, in
 sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7408)
       File "coerce_maps.pyx", line 100, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args
 (sage/structure/coerce_maps.c:4004)
       File "coerce_maps.pyx", line 90, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args
 (sage/structure/coerce_maps.c:3816)
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/combinat/languages/base_class.py", line 364, in
 _element_constructor_
         w = ec(data,self,**kkwds)
       File "word_datatypes.pyx", line 31, in
 sage.combinat.words.word_datatypes.FiniteWord_list.__init__
 (sage/combinat/words/word_datatypes.c:2030)
     TypeError: __init__() got an unexpected keyword argument 'cache'
 **********************************************************************

 [...]

 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/abstract_word.py", line 663:
     sage: w = Word(iter("abbacabba"))
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_16[6]>", line 1, in <module>
         w = Word(iter("abbacabba"))###line 663:
     sage: w = Word(iter("abbacabba"))
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/combinat/words/word.py", line 262, in Word
         return parent(data, **options)
       File "parent.pyx", line 807, in
 sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7388)
       File "coerce_maps.pyx", line 82, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (sage/structure/coerce_maps.c:3583)
       File "coerce_maps.pyx", line 77, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (sage/structure/coerce_maps.c:3485)
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/combinat/words/words.py", line 1705, in
 _element_constructor_
         return self.infinite_words()(data, **options)
       File "parent.pyx", line 809, in
 sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7408)
       File "coerce_maps.pyx", line 100, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args
 (sage/structure/coerce_maps.c:4004)
       File "coerce_maps.pyx", line 90, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args
 (sage/structure/coerce_maps.c:3816)
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/categories/shifts.py", line 376, in _element_constructor_
         self.check_element(w)
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/dynamics/symbolic/full_shift.py", line 217, in check_element
         if elt[i] not in A:
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/combinat/words/lazy_word.py", line 791, in __getitem__
         return self._get_letter(key)
       File "lazy_list.pyx", line 615, in
 sage.misc.lazy_list.lazy_list.__call__ (sage/misc/lazy_list.c:3849)
     IndexError: lazy list index out of range
 **********************************************************************

 [...]

 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/abstract_word.py", line 730:
     sage: w.lex_less(u)
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_18[5]>", line 1, in <module>
         w.lex_less(u)###line 730:
     sage: w.lex_less(u)
       File "element.pyx", line 332, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:3527)
       File "misc.pyx", line 204, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1488)
     AttributeError: 'sage.combinat.words.word_datatypes.FiniteWord_list'
 object has no attribute 'lex_less'
 **********************************************************************

 [...]

 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/abstract_word.py", line 794:
     sage: w.apply_morphism(d)
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_20[4]>", line 1, in <module>
         w.apply_morphism(d)###line 794:
     sage: w.apply_morphism(d)
       File "element.pyx", line 332, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:3527)
       File "misc.pyx", line 204, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1488)
     AttributeError: 'sage.combinat.words.word_datatypes.FiniteWord_str'
 object has no attribute 'apply_morphism'
 **********************************************************************
 [...]

 **********************************************************************
 34 items had failures:
    3 of   9 in __main__.example_0
    4 of   7 in __main__.example_1
    5 of   9 in __main__.example_11
   15 of  30 in __main__.example_12
    7 of  10 in __main__.example_13
    7 of  10 in __main__.example_14
    3 of   9 in __main__.example_15
    8 of  16 in __main__.example_16
    6 of  10 in __main__.example_17
    6 of  15 in __main__.example_18
    6 of  15 in __main__.example_19
    3 of   6 in __main__.example_2
    5 of  13 in __main__.example_20
    6 of  11 in __main__.example_21
    5 of  10 in __main__.example_22
   10 of  18 in __main__.example_23
   10 of  18 in __main__.example_24
   16 of  28 in __main__.example_25
    4 of   9 in __main__.example_26
    3 of   8 in __main__.example_27
    2 of   7 in __main__.example_28
   11 of  16 in __main__.example_3
    9 of  16 in __main__.example_30
    2 of  18 in __main__.example_31
    9 of  19 in __main__.example_32
   10 of  17 in __main__.example_33
    4 of   9 in __main__.example_34
    8 of  15 in __main__.example_35
    7 of  12 in __main__.example_36
    3 of   6 in __main__.example_4
    5 of  12 in __main__.example_5
    4 of   9 in __main__.example_6
    3 of  10 in __main__.example_7
    7 of  13 in __main__.example_8
 ***Test Failed*** 216 failures.
 For whitespace errors, see the file
 /Users/slabbe/.sage//tmp/abstract_word_14102.py
 }}}

 {{{
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/shuffle_product.py", line 255:
     sage: S = ShuffleProduct_overlapping(w,u)
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_12[4]>", line 1, in <module>
         S = ShuffleProduct_overlapping(w,u)###line 255:
     sage: S = ShuffleProduct_overlapping(w,u)
       File "/Users/slabbe/Applications/sage-5.6.rc0/local/lib/python/site-
 packages/sage/combinat/words/shuffle_product.py", line 577, in __init__
         raise TypeError("w1 and w2 should be words over integers")
     TypeError: w1 and w2 should be words over integers
 **********************************************************************
 }}}

 {{{
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/word.py", line 362:
     sage: w.is_symmetric()
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_8[5]>", line 1, in <module>
         w.is_symmetric()###line 362:
     sage: w.is_symmetric()
       File "element.pyx", line 332, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:3527)
       File "misc.pyx", line 200, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1406)
     AttributeError: 'FiniteWord_callable_with_category' object has no
 attribute 'is_symmetric'
 **********************************************************************

 [...]
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/word.py", line 399:
     sage: prefix.minimal_period()
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_9[7]>", line 1, in <module>
         prefix.minimal_period()###line 399:
     sage: prefix.minimal_period()
       File "element.pyx", line 332, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:3527)
       File "misc.pyx", line 204, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1488)
     AttributeError: 'sage.combinat.words.word_datatypes.FiniteWord_list'
 object has no attribute 'minimal_period'
 **********************************************************************

 }}}

 {{{
 **********************************************************************
 File "/Users/slabbe/Applications/sage-5.6.rc0/devel/sage-
 main/sage/combinat/words/words.py", line 1217:
     sage: for m in W.iter_morphisms([2, 1]): m
 Exception raised:
     Traceback (most recent call last):
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sagedoctest.py", line
 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/Users/slabbe/Applications/sage-5.6.rc0/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_32[12]>", line 1, in <module>
         for m in W.iter_morphisms([Integer(2), Integer(1)]): m###line
 1217:
     sage: for m in W.iter_morphisms([2, 1]): m
       File "parent.pyx", line 627, in
 sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6187)
       File "misc.pyx", line 200, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1406)
     AttributeError: 'FiniteAndInfiniteWords_with_category' object has no
 attribute 'iter_morphisms'
 **********************************************************************

 }}}

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