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 mark.dickinson
Recipients Christian.Kleineidam, NeilGirdhar, aisaac, dkorchem, madison.may, mark.dickinson, 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 <>
> 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.
Date User Action Args
2016-04-07 07:21:09mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, pitrou, aisaac, westley.martinez, serhiy.storchaka, NeilGirdhar, madison.may, dkorchem, Christian.Kleineidam, xksteven
2016-04-07 07:21:09mark.dickinsonsetmessageid: <>
2016-04-07 07:21:09mark.dickinsonlinkissue18844 messages
2016-04-07 07:21:09mark.dickinsoncreate