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
like:
class FactoryFactory:
def __init__(self):
# initialize a new factory
...
implementer(self, someinterfacethatmyinstancesimplement)
Jim
--
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com