Chris Withers wrote:
Hi All,

What's the difference between these two?

implementedBy is what I meant to use, by I braino'ed isImplementedBy instead.

    def providedBy(object):
        """Test whether the interface is implemented by the object

        Return true of the object asserts that it implements the
        interface, including asserting that it implements an extended

    def implementedBy(class_):
"""Test whether the interface is implemented by instances of the class

        Return true of the class asserts that its instances implement the
        interface, including asserting that they implement an extended

    def isImplementedBy(self, ob):
            "isImplementedBy has been renamed to providedBy",
            DeprecationWarning, stacklevel=2,
        return self.providedBy(ob)

That's 2.10, grep lib/python/zope/interface on your own instance in case it's changed. However, IFoo.providedBy(obj) and IFoo.implementedBy(obj.__class__) should be the same.

Rather than getting an AttributeError, I just got unexpected behaviour :-(

You know as well as anyone that this is a pointless message without any more detail.


Zope3-dev mailing list

Reply via email to