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 rhettinger
Recipients IRomanowska, rhettinger
Date 2019-11-22.04:25:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574396729.38.0.384881766408.issue38881@roundup.psfhosted.org>
In-reply-to
Content
> When zero weights are given, the last element of a sequence 
> is always chosen.

Given non-sensical input, that behavior is as reasonable as any other (fwiw, the same is also observed with all negative weights, even if the negative weights are unequal).

The documentation currently says, "weights are assumed to be non-negative."  Perhaps it should say, "weights are assumed to be non-negative and have at least one positive weight."
History
Date User Action Args
2019-11-22 04:25:29rhettingersetrecipients: + rhettinger, IRomanowska
2019-11-22 04:25:29rhettingersetmessageid: <1574396729.38.0.384881766408.issue38881@roundup.psfhosted.org>
2019-11-22 04:25:29rhettingerlinkissue38881 messages
2019-11-22 04:25:29rhettingercreate