[CalendarServer-changes] [13023] twext/trunk/twext/who/expression.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Mar 28 10:33:42 PDT 2014
Revision: 13023
http://trac.calendarserver.org//changeset/13023
Author: gaya at apple.com
Date: 2014-03-28 10:33:42 -0700 (Fri, 28 Mar 2014)
Log Message:
-----------
add CompoundExpression.__repr__()
Modified Paths:
--------------
twext/trunk/twext/who/expression.py
Modified: twext/trunk/twext/who/expression.py
===================================================================
--- twext/trunk/twext/who/expression.py 2014-03-28 17:07:54 UTC (rev 13022)
+++ twext/trunk/twext/who/expression.py 2014-03-28 17:33:42 UTC (rev 13023)
@@ -44,10 +44,10 @@
"""
Contants for common operands.
"""
- OR = NamedConstant()
+ OR = NamedConstant()
AND = NamedConstant()
- OR.description = u"or"
+ OR.description = u"or"
AND.description = u"and"
@@ -66,6 +66,15 @@
self.operand = operand
+ def __repr__(self):
+ return (
+ "<{self.__class__.__name__}: "
+ "{self.expressions!r} {self.operand!r}>"
+ .format(self=self)
+ )
+
+
+
#
# Match expression
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140328/6193b233/attachment-0001.html>
More information about the calendarserver-changes
mailing list