Martijn Faassen wrote:
Jim Fulton wrote:

   If a factory is not a class, and if it allows attributes to be
   set on it, then the interface.implementor function can be used to make
   declarations for it.  This is documeted in zope/interfaces/README.txt
   and zope/component/README.txt.

This is one bit I was missing, thanks.

Unfortunately I read in zope/interface/README.txt that the 'implementer' function cannot be used for classes yet, so this will change the design somewhat (I was using __call__, looks like I'll have to exploit lexical scoping and generate a function on the fly).

No.  You can use it on an instance of the class.  You want something

  class FactoryFactory:

      def __init__(self):
          # initialize a new factory
          implementer(self, someinterfacethatmyinstancesimplement)


Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714  
Zope Corporation
Zope3-dev mailing list

Reply via email to