HELP: restore my faith in Python

Mike Fletcher mfletch at tpresence.com
Fri Mar 3 20:14:41 CET 2000


int is, effectively doing a floor, you have a value just slightly less than
1.0 ...

>>> int( 0.999999999999999 )
0
>>> 0.999999999999999
1.0
>>> int( round( 0.999999999999999) )
1
>>> 

Ain't rounding fun :) .

-----Original Message-----
From: Holton, Steven [NCRTP:6125:EXCH]
[mailto:sholton at americasm10.nt.com]
Sent: Friday, March 03, 2000 2:07 PM
To: python-list at python.org
Subject: HELP: restore my faith in Python


...
int( 1.0 ) = 1   (don't it?)
...




More information about the Python-list mailing list