2
다음 예제에서는 ICarentInterface를 구현하는 개체에 IChildInterface를 구현하는 개체 목록 인 mycollection 특성을 제공해야합니다.zope.interface.Interface는 다른 인터페이스를 구현하는 객체의 목록을 구현해야합니까?
from zope.schema import Text, List
from zope.interface import Interface
class IChildInterface(Interface):
someField = Text()
class IParentInterface(Interface):
mycollection = List(value_type=IChildInterface)
이 할 수있는 간단한 방법이 있나요, 아니면 불변을 사용해야합니다?