output hex numbers for node ids in Node.dump() as in tracebacks etc.
authorStefan Behnel <scoder@users.berlios.de>
Thu, 25 Nov 2010 21:13:36 +0000 (22:13 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 25 Nov 2010 21:13:36 +0000 (22:13 +0100)
Cython/Compiler/Nodes.py

index 14206c94e2671f191d9c2a8a487b2beb75da9b0a..fbadf7f3cfe0541211be8b9e1073aeefac64d412 100644 (file)
@@ -255,10 +255,10 @@ class Node(object):
         
         attrs = [(key, value) for key, value in self.__dict__.iteritems() if key not in filter_out]
         if len(attrs) == 0:
-            return "<%s (%d)>" % (self.__class__.__name__, id(self))
+            return "<%s (0x%x)>" % (self.__class__.__name__, id(self))
         else:
             indent = "  " * level
-            res = "<%s (%d)\n" % (self.__class__.__name__, id(self))
+            res = "<%s (0x%x)\n" % (self.__class__.__name__, id(self))
             for key, value in attrs:
                 res += "%s  %s: %s\n" % (indent, key, dump_child(value, level + 1))
             res += "%s>" % indent