From: Stefan Behnel Date: Thu, 25 Nov 2010 21:13:36 +0000 (+0100) Subject: output hex numbers for node ids in Node.dump() as in tracebacks etc. X-Git-Tag: 0.14.alpha0~78 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5ecdb4d84f06a7309f178d6687457610014c7608;p=cython.git output hex numbers for node ids in Node.dump() as in tracebacks etc. --- 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