Tim Peters <t...@python.org> added the comment:

There are a number of "obvious" properties that should obtain, given the 
intended meaning of weights:

- An input with weight 0 should never be returned.

- The distribution shouldn't be affected by adding a new input with weight 0.

- The distribution shouldn't be affected by removing an input with weight 0.

Especially because of the 3rd, the only sensible thing to do is to treat an 
input with weights all 0 much like an empty population - although, in context, 
ValueError would make more immediate sense for "all weights are 0" than the 
IndexError raised for an empty population.

Anything other than that is "too clever" by half, and I just don't believe 
would be of real use often enough to be worth violating the "obvious" 
properties above.

----------

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

Reply via email to