# HG changeset patch # User Sylvain Thénault # Date 1295610718 -3600 # Node ID 658039c5eeacc577d5718ae16e48f01f0b8de982 # Parent 900cb9b1b687dda9a4851faf411724c131b27a2d [selectors] minor: use similar __repr__ implementation for selector instances diff -r 900cb9b1b687 -r 658039c5eeac appobject.py --- a/appobject.py Thu Jan 20 13:16:30 2011 +0100 +++ b/appobject.py Fri Jan 21 12:51:58 2011 +0100 @@ -214,6 +214,9 @@ return NotImplementedError("selector %s must implement its logic " "in its __call__ method" % self.__class__) + def __repr__(self): + return u'' % (self.__class__.__name__, id(self)) + class MultiSelector(Selector): """base class for compound selector classes""" diff -r 900cb9b1b687 -r 658039c5eeac selectors.py --- a/selectors.py Thu Jan 20 13:16:30 2011 +0100 +++ b/selectors.py Fri Jan 21 12:51:58 2011 +0100 @@ -1156,8 +1156,8 @@ rql = 'Any COUNT(X) WHERE X eid %%(x)s, %s' % expression self.rql = rql - def __repr__(self): - return u'' % (self.rql, id(self)) + def __str__(self): + return '%s(%r)' % (self.__class__.__name__, self.rql) def score(self, req, rset, row, col): try: