STINNER Victor added the comment: There is a simple fix. If the result is invalid, drop it and generate a new number. It should keep the distribution uniform.
Another fix is to only use integers. Why do we use float in choice by the way? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24567> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com