[Zope3-checkins]
SVN: Zope3/branches/ZopeX3-3.0/src/zope/schema/fields.txt
Merge r27501 from trunk: Rectify documentation
Philipp von Weitershausen
philikon at philikon.de
Sun Sep 12 10:36:05 EDT 2004
Log message for revision 27502:
Merge r27501 from trunk: Rectify documentation
Changed:
U Zope3/branches/ZopeX3-3.0/src/zope/schema/fields.txt
-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/schema/fields.txt
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/schema/fields.txt 2004-09-12 14:29:42 UTC (rev 27501)
+++ Zope3/branches/ZopeX3-3.0/src/zope/schema/fields.txt 2004-09-12 14:36:05 UTC (rev 27502)
@@ -28,8 +28,10 @@
>>> from zope.schema import List, Float
>>> class IInventoryItem(Interface):
... pricePoints = List(
- ... Float(title=u"Price", min=0),
- ... unique=True, title=u"Price Points")
+ ... title=u"Price Points",
+ ... unique=True,
+ ... value_type=Float(title=u"Price", min=0)
+ ... )
This indicates several things.
@@ -45,11 +47,11 @@
them these::
>>> from zope.schema.interfaces import IList, ISequence, ICollection
- >>> IList.providedBy(IInventoryItem.pricePoints)
+ >>> IList.providedBy(IInventoryItem['pricePoints'])
True
- >>> ISequence.providedBy(IInventoryItem.pricePoints)
+ >>> ISequence.providedBy(IInventoryItem['pricePoints'])
True
- >>> ICollection.providedBy(IInventoryItem.pricePoints)
+ >>> ICollection.providedBy(IInventoryItem['pricePoints'])
True
Creating a custom collection field
More information about the Zope3-Checkins
mailing list