a Python bug report

Ruifeng Guo Ruifeng.Guo at synopsys.com
Tue May 29 21:07:38 EDT 2018


Hello,
We encountered a bug in Python recently, we checked the behavior for Python version 2.7.12, and 3.1.1, both version show the same behavior. Please see below the unexpected behavior in "red text".

Thanks,
Ruifeng Guo

From: Brian Archer
Sent: Tuesday, May 29, 2018 5:57 PM
To: Ruifeng Guo <rfguo at synopsys.com>
Subject: Python Bug

Python 3.1.1 (r311:74480, Nov 20 2012, 09:11:57)
[GCC 4.2.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a=1017.0
>>> print(int(a))
1017
>>> b=1000*1.017
>>> print(b)
1017.0
>>> int(b)
1016
>>> c=1017.0
>>> int(c)
1017
>>>






More information about the Python-list mailing list