zope implementedBy returning false(when it should return True as the
example says)
Alright, so I just started digging into ZCA because I want to use it
extensively on my next project, but I think i ran into a bug or something.
I pretty much copied everything from the zope interface example from this
link http://docs.zope.org/zope.interface/README.html
Here is my code
import zope.interface
class IFoo(zope.interface.Interface):
"""Foo blah blah"""
x = zope.interface.Attribute("""X blah blah""")
def bar(q, r=None):
"""bar blah blah"""
class Foo:
zope.interface.implements(IFoo)
def __init__(self, x=None):
self.x = x
def bar(self, q, r=None):
return q, r, self.x
def __repr__(self):
return "Foo(%s)" % self.x
print IFoo.implementedBy('Foo')
The problem is that IFoo.implementedBy('Foo') is returning False when it
should be True. I can't seem to understand why in the world would it
return False, when it should be returning True.
Any help would be appreciated.
No comments:
Post a Comment