OCD cosmetics.
authorFrancois Fleuret <francois@fleuret.org>
Thu, 7 Sep 2017 15:52:53 +0000 (17:52 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Thu, 7 Sep 2017 15:52:53 +0000 (17:52 +0200)
agtree2dot.py

index 24d5f85..2dcc1d7 100755 (executable)
@@ -92,11 +92,9 @@ def fill_graph_lists(u, node_labels, node_list, link_list):
             add_link(node_list, link_list, u, 0, u.variable, 0)
 
         if hasattr(u, 'next_functions'):
-            i = 0
-            for v, j in u.next_functions:
+            for i, (v, j) in enumerate(u.next_functions):
                 fill_graph_lists(v, node_labels, node_list, link_list)
                 add_link(node_list, link_list, u, i, v, j)
-                i += 1
 
 ######################################################################