Re: [FE-discuss] Possible bug with Number validator

Top Page
Author: Aston Motes
Date:  
To: Ian Bicking
CC: formencode-discuss
Subject: Re: [FE-discuss] Possible bug with Number validator
int(float('inf')) raises an OverflowException. The problematic lines
are something like

    value = float(value)
    if value == int(value):

They're lines 956 and 957 in my formencode/validators.py, but I've got
old stuff.

- Aston

On Tue, Apr 7, 2009 at 10:41 PM, Ian Bicking <ianb@???> wrote:
> On Tue, Apr 7, 2009 at 9:09 PM, Aston Motes <aston@???> wrote:
>>
>> I don't (really) mind infinity being accepted; it's just weird that
>> the validator ends up raising an exception no part of the stack is
>> expecting. It pretty much makes using the validate decorator
>> impossible without wrapping it up with my own thing.
>>
>> Or maybe you're saying infinity works correctly (no exception raised)
>> in the new version of formencode? I'm still on 0.7.1.
>
> I didn't realize it would raise an exception... where is the exception
> coming from?
>
> --
> Ian Bicking  |  http://blog.ianbicking.org
>


------------------------------------------------------------------------------
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
_______________________________________________
FormEncode-discuss mailing list
FormEncode-discuss@???
https://lists.sourceforge.net/lists/listinfo/formencode-discuss