[issue33203] random.choice: raise IndexError on empty sequence even when not using getrandbits internally

Raymond Hettinger report at bugs.python.org
Mon Apr 2 19:01:09 EDT 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

I'll mull this over for while.  There is some merit in getting the various components to fit together more uniformly.  There's also the option of having choice() catch either a ZeroDivisionError or ValueError.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33203>
_______________________________________


More information about the Python-bugs-list mailing list