summaryrefslogtreecommitdiff
path: root/lib/automata.py
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-02-21 16:55:19 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-02-21 16:55:19 +0100
commit6357bd51859bb29629d360309b2b4134b6ae766d (patch)
tree83ca4d3f8f1eb143e3cf4355b72e2bd875c3779c /lib/automata.py
parent53c0421d66ebe6644cdd4d36c0fb849f352c4641 (diff)
dfs: always return tuples
Diffstat (limited to 'lib/automata.py')
-rwxr-xr-xlib/automata.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/automata.py b/lib/automata.py
index 640da96..f9c8ad6 100755
--- a/lib/automata.py
+++ b/lib/automata.py
@@ -93,7 +93,7 @@ class State:
for args in zip(*trans.argument_values):
yield [(trans, args)]
else:
- yield [trans]
+ yield [(trans,)]
else:
for trans in self.outgoing_transitions.values():
for suffix in trans.destination.dfs(depth - 1, with_arguments = with_arguments):
@@ -113,7 +113,7 @@ class State:
new_suffix.extend(suffix)
yield new_suffix
else:
- new_suffix = [trans]
+ new_suffix = [(trans,)]
new_suffix.extend(suffix)
yield new_suffix