[Zope3-dev] Schema Converters

Stephan Richter srichter@cbu.edu
Mon, 15 Jul 2002 11:43:25 -0400


On Monday 15 July 2002 11:35, Martijn Faassen wrote:
> 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 ju=
st
> > 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 val=
ue
> > 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.

Yes, this is the conclusion I cam e this weekend too. I wanted to check in =
my=20
Converter stuff, but I have no tests yet.

Regards,
Stephan
=2D-=20
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training