Python, mysql, floating point values question
Terry Hancock
hancock at anansispaceworks.com
Sat Jul 2 17:00:59 EDT 2005
On Friday 01 July 2005 11:13 pm, John Machin wrote:
> x BETWEEN y AND z
Ah, even better, thank you.
> The python equivalent would be to write it out as:
> >
> > if a > b-epsilon and a < b+epsilon:
> > print "a~=b"
>
> Try this:
>
> if b-epsilon < a < b+epsilon:
This I knew, but I was trying to write the closest thing
to what the SQL code would look like, and I didn't know
about BETWEEN.
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Python-list
mailing list