I'm not sure how widgets manage to get default values; I know that
zope.schema itself doesn't set them.

There is further problem with the design for "default" -- see discussion
of "default_factory" on zope3-dev: basically, even if the widget were to
get this default, it would be *the* list for every implementation of
IMyContent (not *a* list with these default values). Maybe for this very
reason the widget ignores the default.

Ideally (in my opinion) there would be a default_factory attribute for
mutable schema objects, and spec of the list would be:

default_factory = lambda : list( ( 1,2,3,5,7 ) )  # new every time,

That said, if these defaults are taken out of a finite universe then
Florian's response is correct.

- Shaun

Zope3-users mailing list

Reply via email to