Henry Chen <taha...@gmail.com> added the comment:

The problem remains that the function can return a number or a list for input 
that is a list of numbers. This means the user will need to handle both 
possibilities every time, which is a heavy burden for such a simple function.

SciPy's mode function does return the minimum mode when there is a tie, which 
as far as I can tell is an arbitrary choice. But in that context, since the 
input is almost always numerical, a minimum is at least well defined, which is 
not true for an input with a mix of types.

For the general use case, the current behavior - raising an exception - in case 
of tie conveys the most information.

----------
nosy: +scotchka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue28956>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to