[Zope-Checkins] CVS: Zope3/lib/python/Schema - IConverter.py:1.2

Stephan Richter srichter@cbu.edu
Tue, 16 Jul 2002 10:03:32 -0400


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

Modified Files:
	IConverter.py 
Log Message:
Okay, I finished the basic Widget stuff and wrote tests for it, which seemed
like it took forever. There are still not all test cases covered, but we 
will have to do this over time. I also expect that some of the code will 
change anyways.

I also disabled briefly the Form tests, since I broke them, but I am working 
on it now anyways, so they will be fixed soon.

What am I going to work on next?

- Make FormViews work nicely.
- Make Widget instances View factories (or something similar)
- Write configuration files for the stuff
- Write a Form layouter.

Note that I will try not to touch the converter, since I think other people
are working on it.



=== Zope3/lib/python/Schema/IConverter.py 1.1 => 1.2 ===
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
+"""
+$Id$
+"""
 from Interface import Interface
 
 class IConverter(Interface):
-    def convert(self, value):
+    """A converter can convert a value from one type to another."""
+
+    def convert(value):
         """Call an IConverter with a value, and it will try to convert to
         another value and return the result. If conversion cannot take
         place, the convertor will raise a ConversionError. (or a
         ValidationError in case of Converters using Schemas inside?)
         """
-        pass