michelts wrote:
Do you know if we can find an older version of FormEncode or better yet,
point us in a direction where we can see what the above to_python is really
doing?


Take a look at the FancyValidator code:

   def to_python(self, value, state=None):
return self.attempt_convert(value, state, self.validate_other, self._to_python, self.validate_python)

If you take a look at the attempt_convert code you will understand the
usage, I'm not very clear about this but I think may use to_python on
your own validators or use the combination of validate_other,
_to_python and validate_python... Anyway, any validator extended from
FancyValidator has a to_python method.

.to_python() is the public API; FancyValidator adds some things like ifEmpty, notEmpty, and ifInvalid to that, and calls ._to_python() to do the real validation.

--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org


-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to