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 jfine2358
Recipients jfine2358, josh.r, remi.lapeyre, vstinner
Date 2019-01-10.17:14:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547140499.7.0.0541774359058.issue35698@roundup.psfhosted.org>
In-reply-to
Content
It might be better in my sample code to write
    isinstance(p, int)
instead of
    type(p) == int
This would fix Rémi's example. (I wanted to avoid thinking about (False // True).)

For median([1, 1]), I am not claiming that 1.0 is wrong and 1 is right. I'm not saying the module is broken, only that it can be improved.

For median([1, 1]), I believe that 1 is a better answer, particularly for school students. In other words, that making this change would improve Python.

As a pure mathematician, to me 1.0 means a number that is close to 1. Whereas 1 means a number that is exactly 1..
History
Date User Action Args
2019-01-10 17:15:01jfine2358setrecipients: + jfine2358, vstinner, josh.r, remi.lapeyre
2019-01-10 17:14:59jfine2358setmessageid: <1547140499.7.0.0541774359058.issue35698@roundup.psfhosted.org>
2019-01-10 17:14:59jfine2358linkissue35698 messages
2019-01-10 17:14:59jfine2358create