Rémi Lapeyre <remi.lape...@henki.fr> added the comment: > As a secondary school student, knowing the definition of median, I might > expect the value to be 2, for any n > 0.
The secondary school student would be wrong, wouldn't he? The median of a set is not expected to be a part of the set. Especially for ints since division by 1 or 2 is not closed for integers. Would the same student expect median([2, 4, 6, 8]) to be part of the set of even integers? I think one taking the median of a set should always ready to deal with floating point arithmetic the result is not guaranteed to be an integer. Going from hoops to make it so when it is equivalent to an integer is rather misleading. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35698> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com