converting float to int issue
Charles Swiger
cswiger at mac.com
Mon May 5 14:33:02 EDT 2003
On Monday, May 5, 2003, at 02:20 PM, Alex wrote:
> Converting a float to an int produces strange results. Is this just a
> bug
> or am I missing something? I tried to search the bug database, but was
> unsucsessful.
That's not the right behavior, obviously. Probably there is a problem
with the version you've got, the way it was compiled, etc. Can you
build your own and run a "make test"...?
9-ns1% python
Python 2.2.2 (#1, Apr 27 2003, 18:57:32)
[GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> int(1.0)
1
>>> int(3.14)
3
--
-Chuck
More information about the Python-list
mailing list