Author jfine2358
Recipients jfine2358, josh.r, remi.lapeyre, vstinner
Date 2019-01-10.12:18:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I read PEP 450 as saying that can be used by "any secondary school student". This is not true for most Python libraries.

In this context, the difference between a float and an int is important. Consider
   statistics.median([2] * n)

As a secondary school student, knowing the definition of median, I might expect the value to be 2, for any n > 0. What else could it be. However, the present code gives 2 for n odd, and 2.0 for n even.

I think that this issue is best approached by taking the point of view of a secondary school student. Or perhaps even a primary school student who knows fractions. (A teacher might use to create learning materials.)

By the way, 2 and 2.0 are not interchangeable. For example
>>> [1] * 2.0
TypeError: can't multiply sequence by non-int of type 'float'
Date User Action Args
2019-01-10 12:18:49jfine2358setrecipients: + jfine2358, vstinner, josh.r, remi.lapeyre
2019-01-10 12:18:48jfine2358setmessageid: <>
2019-01-10 12:18:48jfine2358linkissue35698 messages
2019-01-10 12:18:48jfine2358create