Aston Motes
2009-04-08 00:56:35 UTC
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
(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