[Zope3-checkins] CVS: Zope3/lib/python/Schema - _Schema.py:1.8 __init__.py:1.3

Martijn Faassen m.faassen@vet.uu.nl
Thu, 25 Jul 2002 18:10:00 -0400


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

Modified Files:
	_Schema.py __init__.py 
Log Message:
Got rid of separate Schema class; just use interfaces now. Updated
Forms and content objects to reflect this change.


=== Zope3/lib/python/Schema/_Schema.py 1.7 => 1.8 ===
     """Pass in field values in mapping and validate whether they
     conform to schema.
     """
-    list = []
+    errors = []
     from IField import IField
     for name in schema.names(1):
         attr = schema.getDescriptionFor(name)
@@ -51,9 +51,9 @@
             try:
                 attr.validate(values.get(name))
             except ValidationError, e:
-                list.append((name, e))
-    if list:
-        raise ValidationErrorsAll, list
+                errors.append((name, e))
+    if errors:
+        raise ValidationErrorsAll, errors
 
 # Now we can create the interesting interfaces and wire them up:
 def wire():


=== Zope3/lib/python/Schema/__init__.py 1.2 => 1.3 ===
 $Id$
 """
 from _Field import *
-from _Schema import Schema, validateMapping, validateMappingAll
+from _Schema import validateMapping, validateMappingAll