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 tim.peters
Recipients IRomanowska, mark.dickinson, rhettinger, tim.peters, xtreak
Date 2019-11-23.02:54:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574477694.64.0.412829222193.issue38881@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-11-23 02:54:54tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, xtreak, IRomanowska
2019-11-23 02:54:54tim.peterssetmessageid: <1574477694.64.0.412829222193.issue38881@roundup.psfhosted.org>
2019-11-23 02:54:54tim.peterslinkissue38881 messages
2019-11-23 02:54:54tim.peterscreate