diff options
Diffstat (limited to 'ass2/ukkonen.py')
| -rw-r--r-- | ass2/ukkonen.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ass2/ukkonen.py b/ass2/ukkonen.py index 8d536c5..b4b0b98 100644 --- a/ass2/ukkonen.py +++ b/ass2/ukkonen.py @@ -199,8 +199,8 @@ def do_phase(root: Node, active: Point, i, last_j, remainder): active = skip_count(remainder, Point(root), i - remainder) last_j = j j += 1 - print(active) - root.print_tree() + # print(active) + # root.print_tree() return active, remainder, last_j @@ -238,7 +238,7 @@ def skip_count(num_chars, start_point: Point, index): direction = Node.string[index] next_node = head.node.get_child(direction) if next_node is None: - raise Exception(f"Attempted to traverse char\n '{direction}' at point {head}. ({index=})") + raise IndexError(f"Attempted to traverse char\n '{direction}' at point {head}. ({index=})") incoming_length = next_node.edge_length if chars_left < incoming_length: break |
