I've just read statistics.py, and found something that might be usefully considered along with the NaN question. >>> median([1]) 1 >>> median([1, 1]) 1.0 To record this, and associated behaviour involving Fraction, I've added: Division by 2 in statistics.median: https://bugs.python.org/issue35698 -- Jonathan