This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients an0n.r00t32, tim.peters
Date 2018-04-27.05:44:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524807869.43.0.682650639539.issue33372@psf.upfronthosting.co.za>
In-reply-to
Content
Please find a minimal example that illustrates the problem you think you've found, and paste the plain text _into_ the bug report.

In the meantime, I'm closing this as "not a bug".  The division operator applied to integers in Python 2 defaults doing truncating integer division, and in Python 3 defaults to doing floating point division instead.  So this example all by itself is enough to show a difference:

Under Python 2.7.11:

>>> 1/8
0

Under Python 3.6.5:

>>> 1/8
0.125

Both are expected.

In exactly the same way, the subexpression "2*1*10/100*10*10+100/10" in the code you pasted returns the integer 10 under Python 2 but the floating point value 30.0 under Python 3.
History
Date User Action Args
2018-04-27 05:44:29tim.peterssetrecipients: + tim.peters, an0n.r00t32
2018-04-27 05:44:29tim.peterssetmessageid: <1524807869.43.0.682650639539.issue33372@psf.upfronthosting.co.za>
2018-04-27 05:44:29tim.peterslinkissue33372 messages
2018-04-27 05:44:28tim.peterscreate