On Thu, 2008-07-10 at 16:59 +0200, Markus Kemmerling wrote:

> I would rather say:
> value=List(
>    title=u"Value",
>    value_type=Object(schema=IMyClass)
> )

Can you elaborate why?

> Anyhow, such a constraint is of limited use only, since it does not  
> prevent you from adding any object you like to the list *after* it  
> got assigned to the 'value' attribute.

Okay, but that would be badly behaved code; correct?

In my implementation I am creating instances and committing them to a
ZODB repository.   My thoughts were that copies of those instances would
continue to constrain the types allowed in that attribute.  Is that


Join the OSHIP project.  It is the standards based, open source
healthcare application platform in Python.
Home page: https://launchpad.net/oship/ 
Wiki: http://www.openehr.org/wiki/display/dev/Python+developer%27s+page 

Attachment: signature.asc
Description: This is a digitally signed message part

Zope3-users mailing list

Reply via email to