[Zope] zope.schema: association vs. containment in Object, List

Fred Drake fdrake at gmail.com
Fri Jun 6 10:26:27 EDT 2008


On Fri, Jun 6, 2008 at 4:54 AM, Sean Upton <sdupton at gmail.com> wrote:
> I want to be able to spell out certain zope.schema.Object fields in my
> interfaces as "contained" while other fields are declared as

Are you using a source or vocabulary?  If so, this could be part of
the nature of the values returned from that.  A particular source
would provide either objects to be contained, or references (not
contained).

Another reasonable approach (IMO) would be to simply document the
containment/reference relationship in the field's description text or
in a comment alongside the field.

Still another approach, if you're looking to create software support
and the first isn't suitable, is to use fields that provide additional
interfaces that indicate the nature of the references.


 -Fred

--
Fred L. Drake, Jr. <fdrake at gmail.com>
"Chaos is the score upon which reality is written." --Henry Miller


More information about the Zope mailing list