[distance] Start the iteration at 1, not 0 because we don't care about the first
authorSimon Chabot <simon.chabot@logilab.fr>
Wed, 17 Oct 2012 11:56:04 +0200
changeset 8 fa36d8b3e6dd
parent 7 1ef125353e35
child 9 18faa981dea6
[distance] Start the iteration at 1, not 0 because we don't care about the first letter (related #128982)
distances.py
--- a/distances.py	Wed Oct 17 11:55:23 2012 +0200
+++ b/distances.py	Wed Oct 17 11:56:04 2012 +0200
@@ -65,7 +65,7 @@
     # where from consecutive consonnants, only the first is kept,
     # and from two identical consonnants separated by a W or a H, only the first
     # is kept too.
-    for i in xrange(len(word[1:])):
+    for i in xrange(1, len(word)):
         if word[i] in vowels:
             continue
         if word[i - 1] not in vowels and \