Changes between Initial Version and Version 1 of Ticket #21769, comment 18


Ignore:
Timestamp:
10/31/16 12:45:24 (6 years ago)
Author:
slabbe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21769, comment 18

    initial v1  
    4545}}}
    4646
    47 >
     47Therefore, I do not see what you are expecting from this part of the description of the ticket:
     48
    4849> {{{
    4950> sage: WordMorphism({00:0000,01:1001,10:0100,11:1101})
     
    6263}}}
    6364
    64 >
    6565> It makes sense why the above example does not work, but it would be nice if one could do it this way.
     66
     67What do you mean by "this way"? Because I do not think that we want to change the fact that 0100 is 64 in Python...
    6668
    6769A morphism is a function which satisfies f(uv) = f(u)f(v). Therefore, defining the images on the letters is sufficient. Maybe what you want to implement is something more general (like a substitution). If yes, I think it would be easier to implement as a new Python class in a new file substitution.py, instead of generalizing morphism.py.