Author steven.daprano
Recipients Windson Yang, cheryl.sabella, francismb, rhettinger, steven.daprano
Date 2019-02-26.14:19:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> Proposed spec:
> '''
> Modify the API statistics.mode to handle multimodal cases so that the 
> first mode encountered is the one returned.  If the input is empty, 
> raise a StatisticsError.

Are you happy guaranteeing that it will always be the first mode 
encountered? I'm not happy about it, but I'll follow you lead on this 

> TestCases:
>     mode([])   --> StatisticsError
>     mode('aabbbcc') --> 'c'

That should be 'b'.

>     mode(iter('aabbbcc')) --> 'c'

And again 'b'.

>     mode('eeffddddggaaaa') --> 'a'

If it is first encountered, that should be 'd'.
Date User Action Args
2019-02-26 14:19:22steven.dapranosetrecipients: + steven.daprano, rhettinger, francismb, cheryl.sabella, Windson Yang
2019-02-26 14:19:22steven.dapranolinkissue35892 messages
2019-02-26 14:19:22steven.dapranocreate