Hi all.

I would like to be able to define an interface which specifies both methods and constants, something like this:

class IMyTest(Interface):
       A = Constant(1)
       B = Constant(2)
       C = Constant(3)

       def aMethod(self, a_value):
            """ something """

A, B and C could be any meaningful constant for this interface, like possible return values for the aMethod. Then I could possibly test any class using and object which implements this simply by testing it against the IMyTest and if the return values are IMyTest.A, IMyTest.B, IMyTest.C.

Is this possible in some way?


Marco Bizzarri
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to