It's quite difficult to have a good title of my question. From what I understand, the Adapter is to add more services to the components without changing it. The adapter can extends services from multiple components.
But what about the dependency between component? How can I set the dependency between the component A (Person) and the component B (Task) like this normal Python code
class Person:
pass
class Task:
def __init__(self, person):
self.owner = person
If I implements the 2 classes
from zope.interface import Interface
from zope.interface import implements
class IPerson(Interface):
pass
class Person(object):
implements(IPerson)
class ITask(Interface):
pass
class Task(object):
implements(ITask)
def __init__(self, person):
self.owner = person
Is it a good implementation?