From 5ecdb4d84f06a7309f178d6687457610014c7608 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 25 Nov 2010 22:13:36 +0100 Subject: [PATCH] output hex numbers for node ids in Node.dump() as in tracebacks etc. --- Cython/Compiler/Nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 14206c94..fbadf7f3 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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 -- 2.26.2