[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/container/constraints.py IContainerTypesConstraint interface added and implemented

Dominik Huber dominik.huber at projekt01.ch
Tue Nov 9 07:37:18 EST 2004


Log message for revision 28412:
  IContainerTypesConstraint interface added and implemented
  by ContainerTypesConstraint.

Changed:
  U   Zope3/trunk/src/zope/app/container/constraints.py

-=-
Modified: Zope3/trunk/src/zope/app/container/constraints.py
===================================================================
--- Zope3/trunk/src/zope/app/container/constraints.py	2004-11-09 10:38:23 UTC (rev 28411)
+++ Zope3/trunk/src/zope/app/container/constraints.py	2004-11-09 12:37:18 UTC (rev 28412)
@@ -345,6 +345,16 @@
     f_locals['__setitem__'] = __setitem__
 
 
+class IContainerTypesConstraint(zope.interface.Interface):
+
+    def __call__(object):
+        """Test whether object is valid.
+
+        Return True if valid.
+        Raise zope.interface.Invalid if the objet is invalid.
+        """
+
+
 class ContainerTypesConstraint(object):
     """Constrain a container to be one of a number of types
 
@@ -368,8 +378,10 @@
     >>> constraint(Ob())
     True
 
-    """ 
+    """
 
+    zope.interface.implements(IContainerTypesConstraint)
+
     def __init__(self, *types):
         self.types = types
 



More information about the Zope3-Checkins mailing list