Re: years later DeprecationWarning

2006-03-25 Thread Steven D'Aprano
On Wed, 22 Mar 2006 13:59:00 -0800, Chris Lasher wrote: > Two things: > 1) math.floor returns a float, not an int. Doing an int() conversion on > a float already floors the value, anyways. No it doesn't, or rather, int() is only equivalent to floor() if you limit the input to non-negative numbers

Re: years later DeprecationWarning

2006-03-22 Thread Enigma Curry
> (That long-gone guy is actually me, according to the notes in the program. > However those brain cells are long gone now, so it might as well not be me.) I had a great long laugh with this bit. I guess it's because I can relate so well :) -- http://mail.python.org/mailman/listinfo/python-list

Re: years later DeprecationWarning

2006-03-22 Thread Ben Finney
Dan Jacobson <[EMAIL PROTECTED]> writes: > Here's the deal: I have to maintain this long gone guy's programs and > lately they've been saying > ./north_pass.py:14: DeprecationWarning: integer argument expected, got float > fl=range(1000*(math.floor(25000*f2m/1000)),46000*f2m,1000) You haven't s

Re: years later DeprecationWarning

2006-03-22 Thread Chris Lasher
Two things: 1) math.floor returns a float, not an int. Doing an int() conversion on a float already floors the value, anyways. Try replacing math.floor(...) with int(...) e.g. >>> math.floor(5.9) 5.0 >>> int(5.9) 5 2) What kind of data is in f2m? If f2m is a float, you will get float values in the

Re: years later DeprecationWarning

2006-03-22 Thread Terry Reedy
"Dan Jacobson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Here's the deal: I have to maintain this long gone guy's programs and > lately they've been saying > ./north_pass.py:14: DeprecationWarning: integer argument expected, got > float > fl=range(1000*(math.floor(25000*f2m/