diff python/flowgraph.py @ 274:ea93e0a7a31e

Move docs
author Windel Bouwman
date Wed, 04 Sep 2013 17:35:06 +0200
parents 5f8c04a8d26b
children 046017431c6a
line wrap: on
line diff
--- a/python/flowgraph.py	Mon Sep 02 17:40:21 2013 +0200
+++ b/python/flowgraph.py	Wed Sep 04 17:35:06 2013 +0200
@@ -13,7 +13,12 @@
         self.live_out = set()
 
     def __repr__(self):
-        return '{}, use={}, def={}'.format(self.ins, self.uses, self.defs)
+        r = '{}'.format(self.ins)
+        if self.uses:
+            r += ' uses:' + ', '.join(str(u) for u in self.uses)
+        if self.defs:
+            r += ' defs:' + ', '.join(str(d) for d in self.defs)
+        return r
 
 
 class FlowGraph(graph.Graph):