[Zope3-checkins] CVS: Zope3/lib/python/Zope/Schema - IField.py:1.4 _bootstrapFields.py:1.2

Jim Fulton jim@zope.com
Wed, 18 Sep 2002 11:05:52 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Schema
In directory cvs.zope.org:/tmp/cvs-serv23268/lib/python/Zope/Schema

Modified Files:
	IField.py _bootstrapFields.py 
Log Message:
Updated uses of Boolean fields to use True and False (rather than 1 and 0).

=== Zope3/lib/python/Zope/Schema/IField.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/Schema/IField.py:1.3	Wed Sep 11 18:06:41 2002
+++ Zope3/lib/python/Zope/Schema/IField.py	Wed Sep 18 11:05:51 2002
@@ -29,25 +29,26 @@
         title=u"Title",
         description=u"A short summary or label",
         default=u"",
-        required=0,
+        required=False,
         )
     
     description = Text(
         title=u"Description",
         description=u"A description of the field",
         default=u"",
-        required=0,)
+        required=False,
+        )
     
     required = Bool(
         title=u"Required",
         description=(
         u"An indication of whether the field value must be provided"),
-        default=1)
+        default=True)
 
     readonly = Bool(
         title="uRead Only",
         description=u"Read-only.", # XXX what is this?
-        default=0)
+        default=False)
 
     default = Field(
         title=u"The default field value",
@@ -78,8 +79,8 @@
 
         (Fields in separate threads could have the same order.)
         """,
-        required=1,
-        readonly=1,
+        required=True,
+        readonly=True,
         )
 
 class IContainer(IField):


=== Zope3/lib/python/Zope/Schema/_bootstrapFields.py 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/Schema/_bootstrapFields.py:1.1	Wed Sep 11 18:06:41 2002
+++ Zope3/lib/python/Zope/Schema/_bootstrapFields.py	Wed Sep 18 11:05:51 2002
@@ -45,7 +45,7 @@
     
     def __init__(self, __name__='', __doc__='',
                  title=u'', description=u'',
-                 required=0, readonly=0, constraint=None, default=None,
+                 required=False, readonly=False, constraint=None, default=None,
                  ):
         """Pass in field values as keyword parameters."""