Author mark.dickinson
Recipients Christian.Kleineidam, aisaac, dkorchem, madison.may, mark.dickinson, neil.g, pitrou, rhettinger, serhiy.storchaka, tim.peters, westley.martinez, xksteven
Date 2016-04-07.07:21:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460013669.64.0.566648461725.issue18844@psf.upfronthosting.co.za>
In-reply-to
Content
> One to make it return a single number if amount == 1 and the other to check that the amount > 1.

I think that's a dangerous API. Any code making a call to "weighted_choice(..., amount=n)" for variable n now has to be prepared to deal with two possible result types. It would be easy to introduce buggy code that fails in the corner case n = 1.
History
Date User Action Args
2016-04-07 07:21:09mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, pitrou, aisaac, westley.martinez, serhiy.storchaka, neil.g, madison.may, dkorchem, Christian.Kleineidam, xksteven
2016-04-07 07:21:09mark.dickinsonsetmessageid: <1460013669.64.0.566648461725.issue18844@psf.upfronthosting.co.za>
2016-04-07 07:21:09mark.dickinsonlinkissue18844 messages
2016-04-07 07:21:09mark.dickinsoncreate