[Zope3-dev] proposal: replace zope.schema.Sequence with zope.schema.Collection

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Apr 28 16:13:35 EDT 2004


On Wednesday 28 April 2004 15:28, Gary Poster wrote:
> I'll give this a whirl unless someone stops me.  Thoughts?

+1 without a doubt. I wonder whether we still need all the other fields and 
should just use collection. Certainly I would do that in my 3rd party code. I 
would prefer 

numbers = Collection(
    title=u"Numbers",
    unique=True,
    ordered=True)

be much nicer than

numbers = List(
    title=u"Numbers",
    unique=True)

since it is much more explicit and I do not have to remember the rules for 
what a set or a list is. Also, notice that at least 70% of the time where we 
use a List/Sequence now, it could be also a set. Usually we do not care about 
order.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training



More information about the Zope3-dev mailing list