[Zope3-Users] Re: schema.List validation does not accept PersistentList

Alek Kowalczyk thealx at poczta.onet.pl
Thu Jul 19 11:54:01 EDT 2007

Leonardo Rochael <leo at ...> writes:

> As it happens, PersistentList is not an instance of "list". Proponents of
> strong dynamically-typed OO would complain that this code is forcing the
> comingling of the "type" concept (a.k.a. interface) into the concept of
> class inheritance [...]
> The solution is for you to define your own schema field for this:
> class PersistentListField(List):
>     _type = PersistentList

Thanks! List should be list, whether it is persistent or not, but it's the
simplest solution...

More information about the Zope3-users mailing list