years later DeprecationWarning

Terry Reedy tjreedy at udel.edu
Wed Mar 22 16:54:54 EST 2006


"Dan Jacobson" <jidanni at jidanni.org> wrote in message 
news:874q1qp51b.fsf at jidanni.org...
> 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)

The warning is from the range function.  If f2m is float, so too the first 
2 args.  Either convert f2m to int first or both args to int.  The second 
is what happens now.  A long too large to convert to int also raises an 
error.

Terry Jan Reedy






More information about the Python-list mailing list