[nodes] remove id(obj) in reprs
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Mon, 21 Oct 2013 18:23:31 +0200
changeset 724 3d5a9d57cf95
parent 719 4e574315c418
child 725 0c8840b3be04
[nodes] remove id(obj) in reprs It just degrades the readability for no apparent benefit. Closes #190394.
nodes.py
--- a/nodes.py	Wed Aug 28 23:30:50 2013 +0200
+++ b/nodes.py	Mon Oct 21 18:23:31 2013 +0200
@@ -824,7 +824,7 @@
         return self.name
 
     def __repr__(self):
-        return 'VarRef(%#X) to %r' % (id(self), self.variable)
+        return 'VarRef(%r)' % self.variable
 
     def __cmp__(self, other):
         return not self.is_equivalent(other)
@@ -1094,7 +1094,7 @@
         self.query = query
 
     def __repr__(self):
-        return 'alias %s(%#X)' % (self.name, id(self))
+        return 'alias %s' % self.name
 
     def get_type(self, solution=None, kwargs=None):
         """return entity type of this object, 'Any' if not found"""
@@ -1131,6 +1131,6 @@
     __slots__ = ('_q_invariant', '_q_sql', '_q_sqltable') # XXX ginco specific
 
     def __repr__(self):
-        return '%s(%#X)' % (self.name, id(self))
+        return '%s' % self.name