Message333410
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.. |
|
Date |
User |
Action |
Args |
2019-01-10 17:15:01 | jfine2358 | set | recipients:
+ jfine2358, vstinner, josh.r, remi.lapeyre |
2019-01-10 17:14:59 | jfine2358 | set | messageid: <1547140499.7.0.0541774359058.issue35698@roundup.psfhosted.org> |
2019-01-10 17:14:59 | jfine2358 | link | issue35698 messages |
2019-01-10 17:14:59 | jfine2358 | create | |
|