Commit c1c3d4ed authored by Jeroen F.J. Laros's avatar Jeroen F.J. Laros

Prepared support for different types of leaf nodes.

parent 53880f20
......@@ -73,6 +73,7 @@ def _iterate(path, node):
yield path
for char in node:
if char:
for result in _iterate(path + char, node[char]):
yield result
......@@ -117,6 +118,7 @@ def _hamming(path, node, word, distance, cigar):
car, cdr = word[0], word[1:]
for char in node:
if char:
if char == car:
penalty = 0
operation = '='
......@@ -155,6 +157,7 @@ def _levenshtein(path, node, word, distance, cigar):
yield result
for char in node:
if char:
# Substitution.
if car:
if char == car:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment