Author Ted Whalen
Recipients Ted Whalen, ariddell, davecom, mark.dickinson, rhettinger
Date 2019-03-01.17:12:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think this should be reopened, as the behavior doesn't always raise an error, and, in fact, does something very unexpected:

Python 3.7.2 (default, Jan 13 2019, 12:50:01)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Counter
>>> from random import choices
>>> Counter(choices("abcdefg", weights=(1,1,-1,1,1,0,1), k=10000))
Counter({'a': 2569, 'b': 2514, 'e': 2487, 'g': 2430})

It's really not clear to me why supplying a negative weight for "c" should have any effect on "d".
Date User Action Args
2019-03-01 17:12:56Ted Whalensetrecipients: + Ted Whalen, rhettinger, mark.dickinson, ariddell, davecom
2019-03-01 17:12:56Ted Whalensetmessageid: <>
2019-03-01 17:12:56Ted Whalenlinkissue31689 messages
2019-03-01 17:12:56Ted Whalencreate