On Feb 8, 4:15 am, KONTRA, Gergely pihent...@gmail.com wrote:
Hi!
I found another inconsistency in validators:
IS_INT_IN_RANGE:
IS_INT_IN_RANGE(0,10) does not accepts 10.
That is by design so that it works as the Python range built-in
function.
range(0,10) = [0,1,2,3,4,5,6,7,8,9]
Yes,
And does it makes sense to make all min and max values optional, so
you can have: enter an integer, which is larger than 2 (witout upper
limit)?
Having had the need recently, I would like to see:
IS_INT_IN_RANGE(1) # any integer0 (up to sys.maxint)
IS_INT_IN_RANGE(max=10) # any integer less
LOL, you got me there...
Can we make an exception?
...
just kidding.
On Feb 8, 11:24 am, KONTRA, Gergely pihent...@gmail.com wrote:
And does it makes sense to make all min and max values optional, so
you can have: enter an integer, which is larger than 2 (witout upper
limit)?
Having had
send me a patch!
On Feb 8, 10:24 am, KONTRA, Gergely pihent...@gmail.com wrote:
And does it makes sense to make all min and max values optional, so
you can have: enter an integer, which is larger than 2 (witout upper
limit)?
Having had the need recently, I would like to see:
On Feb 8, 5:13 pm, DenesL denes1...@yahoo.ca wrote:
On Feb 8, 4:15 am, KONTRA, Gergely pihent...@gmail.com wrote: Hi!
IS_FLOAT_IN_RANGE(0,10) will accept 10, and will accept 0.
Since there is no equivalent in Python this one works as one would
normally expect.
Errr, so, INTs works as python
On Feb 8, 2010, at 8:13 AM, DenesL wrote:
Having had the need recently, I would like to see:
IS_INT_IN_RANGE(1) # any integer0 (up to sys.maxint)
IS_INT_IN_RANGE(max=10) # any integer less than 10
and similarly for IS_FLOAT_IN_RANGE().
Suggestion: interpret None as no limit. So your two
I am for it.
On Feb 8, 10:41 am, Jonathan Lundell jlund...@pobox.com wrote:
On Feb 8, 2010, at 8:13 AM, DenesL wrote:
Having had the need recently, I would like to see:
IS_INT_IN_RANGE(1) # any integer0 (up to sys.maxint)
IS_INT_IN_RANGE(max=10) # any integer less than 10
and similarly
On Feb 8, 2010, at 8:34 AM, mdipierro wrote:
send me a patch!
I'd suggest otherwise--in particular interpreting None as no limit in the min
or max direction.
Interpreting (4) as (0,4) saves the developer two characters of typing. But
interpreting (4, None) or (None, 4) as no limit extends
yes. better
On Feb 8, 11:04 am, Jonathan Lundell jlund...@pobox.com wrote:
On Feb 8, 2010, at 8:34 AM, mdipierro wrote:
send me a patch!
I'd suggest otherwise--in particular interpreting None as no limit in the
min or max direction.
Interpreting (4) as (0,4) saves the developer two
9 matches
Mail list logo