[Zope3-checkins] SVN: Zope3/trunk/src/zope/schema/fields.txt Rectify documentation

Philipp von Weitershausen philikon at philikon.de
Sun Sep 12 10:29:42 EDT 2004


Log message for revision 27501:
  Rectify documentation
  


Changed:
  U   Zope3/trunk/src/zope/schema/fields.txt


-=-
Modified: Zope3/trunk/src/zope/schema/fields.txt
===================================================================
--- Zope3/trunk/src/zope/schema/fields.txt	2004-09-12 06:02:38 UTC (rev 27500)
+++ Zope3/trunk/src/zope/schema/fields.txt	2004-09-12 14:29:42 UTC (rev 27501)
@@ -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