[Zope3-dev] Schema Converters

Martijn Faassen faassen@vet.uu.nl
Mon, 15 Jul 2002 17:35:15 +0200


Martijn Faassen wrote:
> Stephan Richter wrote:
> > I think that converters shoudl convert from Field to Field and not map Python 
> > types. This way it will be much more flexible.
> 
> I do not understand; the input will not yet conform to any field but just a
> python value such as a string (say as a result of browser form submits).
> The point of converters + validators is to make sure this value conforms to
> a particular field in a schema.
[snip]
> How does mapping from Field to Field come in here?

Thinking about this some more, if we can assert interfaces on basic 
python types and such, we could at least specify which interface gets
converted to what other interface. Converters would in that case be
a kind of adapter.. I'm not sure what the consequences of that would be.

Regards,

Martijn