Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Negative weights are undefined for choices() as well. Just like bisect() and merge() don't verify their inputs are sorted. Usually, full scan precondition checks are expensive in pure python and aren't worth penalizing correct code. As Henk-Jaap points-out, negative weights are just a special case of meaningless inputs. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40569> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com