This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scotchka
Recipients scotchka, sria91, steven.daprano, terry.reedy, wolma
Date 2019-03-10.16:42:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552236123.55.0.0109643281436.issue28956@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-03-10 16:42:03scotchkasetrecipients: + scotchka, terry.reedy, steven.daprano, wolma, sria91
2019-03-10 16:42:03scotchkasetmessageid: <1552236123.55.0.0109643281436.issue28956@roundup.psfhosted.org>
2019-03-10 16:42:03scotchkalinkissue28956 messages
2019-03-10 16:42:03scotchkacreate