[selectors] provide a nicer representation of rql_condition
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 21 May 2009 00:42:05 +0200
changeset 1887 7e19c94ce0d7
parent 1886 f0e28ddba7c5
child 1888 f36d43f00f32
[selectors] provide a nicer representation of rql_condition
selectors.py
--- a/selectors.py	Wed May 20 22:28:45 2009 +0200
+++ b/selectors.py	Thu May 21 00:42:05 2009 +0200
@@ -926,6 +926,8 @@
         except Unauthorized:
             return 0
 
+    def __repr__(self):
+        return u'<rql_condition "%s" at %x>' % (self.rql, id(self))
 
 class but_etype(EntitySelector):
     """accept if the given entity types are not found in the result set.