[Interface-dev] module-level interface
Jim Fulton
jim at zope.com
Wed Jun 8 14:25:44 EDT 2005
John Lenton wrote:
> On 6/8/05, Jim Fulton <jim at zope.com> wrote:
>
>>Modules can never implement an interface because they are
>>not callable.
>>
>>We say that a factory (commonly a class) "implements" an interface,
>>by which we mean that the objects created by the factory "provide"
>>the interface. An object "provides" an interface if it satisfies the
>>specification defined by the interface.
>
>
> ah, I see. So what I'm wanting to do is for the module to provide an
> interface, part of which is that it defines classes that implement
> different interfaces. Did I get it right this time?
Yup
>>>with this, verifyObject checks that the skin provides the Window
>>>class, but that's all; I'd like for it to check if the Window
>>>implements IWindow. Is that doable? (I know I could do it "by hand"
>>>using several verifies, but I thought I'd ask before doing
>>>that---maintainability would suck)
>>
>>The current verification framework is very crude and not very powerful.
>>It alone cannot answer this question.
>
>
> I see. Would a verifyModule that did the kind of checks that I'm
> needing be useful in general?
Possibly.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Interface-dev
mailing list