drime

French rhyme dictionary with web and CLI interface
git clone https://a3nm.net/git/drime/
Log | Files | Refs | README

commit bd59f05eddd501b9d6f58ac145f412c693fa7d9e
parent d080d406c89a404ade7e4d3fcfa87f4297034afe
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed,  9 Nov 2011 12:04:01 +0100

add comments and TODO

Diffstat:
reorder.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/reorder.py b/reorder.py @@ -1,10 +1,12 @@ #!/usr/bin/python3 -O # TODO test "suis", "lui"... no multiple interpretations! +# TODO assonance import sys def lcs(x, y): + """Longest common suffix""" i = 1 while x[-i] == y[-i]: i += 1 @@ -13,6 +15,7 @@ def lcs(x, y): return i - 1 def pad(x, n): + """Pad x to n chars""" return x + ' ' * max(0, n - len(x)) def mp(items, lens, field):