[Grok-dev] schema.List returns a list, but is it persistent?
Martin Aspeli
optilude+lists at gmail.com
Thu Aug 27 07:13:19 EDT 2009
Sebastian Ware wrote:
> That is true, however I would definitely call that behaviour a bug in
> schema.List. The assumption that only data manipulation is done with
> applyData sounds risky. You could get some pretty creepy bugs...
>
> Anyway, I'll look into your suggestion.
>
> A suggestion is to change the behaviour of applyData so that it
> returns PersistentList.
-1
The implications for backwards compatibility are enormous.
Using a standard list is fine. It just means that if you modify the list
you need to do _p_changed = True on the parent object, or re-set the
whole list.
Martin
--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the Grok-dev
mailing list