Author MihaiHimself
Recipients MihaiHimself, docs@python
Date 2017-05-14.09:08:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494752919.15.0.561616045601.issue30361@psf.upfronthosting.co.za>
In-reply-to
Content
Section 3.1.1 in the Docs states:
"operators with mixed type operands convert the integer operand to floating point"
https://docs.python.org/3/tutorial/introduction.html

But gives an example using the division operator:
>>> 3 * 3.75 / 1.5
7.5
>>> 7.0 / 2
3.5

In Python 3, division always returns a float, e.g. when all operands are integers:
>>> 3 * 3 / 1
9.0
>>> 7 / 2
3.5

To illustrate that "operators with mixed type operands convert the integer operand to floating point" the example should not use division. For example:
>>> 3 * 3.75 - 1
10.25
>>> 7.0 + 2
9.0
History
Date User Action Args
2017-05-14 09:08:39MihaiHimselfsetrecipients: + MihaiHimself, docs@python
2017-05-14 09:08:39MihaiHimselfsetmessageid: <1494752919.15.0.561616045601.issue30361@psf.upfronthosting.co.za>
2017-05-14 09:08:39MihaiHimselflinkissue30361 messages
2017-05-14 09:08:38MihaiHimselfcreate