Even more decorators do not check their input type

Felix Schwarz <felix.schwarz-S0/[email protected]>
Newsgroups gmane.comp.python.formencode
Message-ID <[email protected]>
Hi,

from formencode.validators import Number
Number().to_python([])
Traceback (most recent call last):
(...)
TypeError: float() argument must be a string or a number

As so many validators are lacking type checking and assume that their
input is a string, I think all existing validators should be reviewed if
they do check their inputs sanely. Maybe it's even justified to subclass
validators.String instead of FancyValidator directly...

fs


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.