-
-
Notifications
You must be signed in to change notification settings - Fork 672
Closed
Description
This concerns word represented by str, tuple and list.
- We want the representation of a concatenation of two words u and v to be preserved when u and v are of the same data type.
ACTUAL BEHAVIOR:
sage: u = Word(range(10))
sage: type(u)
<class 'sage.combinat.words.word.FiniteWord_list'>
sage: type(u*u)
<class 'sage.combinat.words.word.FiniteWord_callable_with_caching'>
sage: v = Word('asdgadsf')
sage: type(v)
<class 'sage.combinat.words.word.FiniteWord_str'>
sage: type(v*v)
<class 'sage.combinat.words.word.FiniteWord_callable_with_caching'>
sage: v = Word((2,3,5,21,34,6))
sage: type(v)
<class 'sage.combinat.words.word.FiniteWord_tuple'>
sage: type(v*v)
<class 'sage.combinat.words.word.FiniteWord_callable_with_caching'>
- Moreover, the empty word could be ignored for concatenation :
ACTUAL BEHAVIOR:
sage: type(Word([]) * Word('asdga'))
<class 'sage.combinat.words.word.FiniteWord_callable_with_caching'>
INTENDED BEHAVIOR:
sage: type(Word([]) * Word('asdga'))
<class 'sage.combinat.words.word.FiniteWord_str'>
CC: @sagetrac-abmasse
Component: combinatorics
Keywords: word, concatenation
Author: Sébastien Labbé
Reviewer: Alexandre Blondin Massé
Merged: sage-4.3.4.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/8233