Am Montag, 6. Februar 2006 12:19 schrieb Stephan Richter:
> On Sunday 08 January 2006 10:01, Florian Lindner wrote:
> > I do it this way now:
> >
> >             utils =  getUtilitiesFor(IFactory)
> >             self.objects = {}
> >             for i in utils:
> >                 if IContainer in i[1].getInterfaces():
> >
> > the UtilityVocabulary gives the same result as getUtilitiesFor.
> > But that does not list all classes, for example there is no class of the
> > normal Folder.
> This is bad and I think a bug. Could you report it as an issue or even
> investigate it further and make a suggestion?

I'm not sure if I described it correctly. I've the following code:

    def __call__(self):
        from import *
        from zope.component.interfaces import IFactory
        from import IContainer
        utils =  getUtilitiesFor(IFactory)
        for i in utils:
            if "" == i[0]:
                import pdb; pdb.set_trace()

at the breakpoint:

(Pdb) i
(u'', <Factory for <class 

(Pdb) i[1].getInterfaces()

(Pdb) IContainer in i[1].getInterfaces()

Should the latter return True? If yes and therefore it is a bug I'll try to 
investigate if further and/or report an issue.

Zope3-users mailing list

Reply via email to