Terry J. Reedy added the comment:

Srikanth, when you reply by email, please remove the quotation of the previous 
message.  On the web page, it is just noise.  The only exception should be when 
you reply to a specific sentence and need to quote that sentence for context.

In my particular experience, mode() is unusally reserved for crudely describing 
unordered categorical data, where the concept of 'minimum' does not apply.

Mode is useful for determining the winner of a vote (or other decision 
process), but in general, it is not a substitute for a more comprehensive look 
at a dataset.

Problems with possibly returning a tuple of data items instead of a data item 
include:

1. The user then has to be prepared to handle a tuple instead of a data item.  
It would be better then to always return a tuple, even for 1 item.

2. Data items can be tuples, making a tuple return ambiguous.  Example use 
case: planar points with int coordinates.

>>> mode(((0,0), (0,0), (0,1)))
(0, 0)

So, while StatisticsError is a nuisance, so are the apparent alternatives.  I 
think we should leave mode alone and close this.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://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