Ted Whalen <tewha...@gmail.com> added the comment:

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".

----------
nosy: +Ted Whalen

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31689>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to