Message315827
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. |
|
Date |
User |
Action |
Args |
2018-04-27 05:44:29 | tim.peters | set | recipients:
+ tim.peters, an0n.r00t32 |
2018-04-27 05:44:29 | tim.peters | set | messageid: <1524807869.43.0.682650639539.issue33372@psf.upfronthosting.co.za> |
2018-04-27 05:44:29 | tim.peters | link | issue33372 messages |
2018-04-27 05:44:28 | tim.peters | create | |
|