Possible bug with Number validator

Aston Motes <[email protected]> Tue, 7 Apr 2009 20:56:35 -0400
Newsgroups gmane.comp.python.formencode
Message-ID <[email protected]>
I generally expect the Number validator to either return a number
(float or int) or raise an Invalid exception. However, if I do the
following:

from formencode.validators import Number
Number.to_python('inf')

I get an OverflowError related to 'inf' being interpreted as the float
infinity. The same thing happens with 'infinity' as the input string.

Is this a for reals bug with FormEncode, or just a corner case
exception I should be aware of and catch?

Thanks,
   - Aston

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com