
7 Jan
2019
7 Jan
'19
8:31 a.m.
On Sun, Jan 6, 2019 at 11:06 PM Steven D'Aprano steve@pearwood.info wrote:
I'm not wedded to the idea that the default ought to be the current behaviour. If there is a strong argument for one of the others, I'm listening.
"Errors should never pass silently"? Silently returning nonsensical results is hard to defend as a default behavior IMO :-)
How would you answer those who say that the right behaviour is not to propogate unwanted NANs, but to fail fast and raise an exception?
Both seem defensible a priori, but every other mathematical operation in Python propagates NaNs instead of raising an exception. Is there something unusual about median that would justify giving it unusual behavior?
-n
--
Nathaniel J. Smith -- https://vorpus.org