Tim Peters added the comment:

Victor, don't ask me, look at the code:  the random.choice() implementations in 
Python 2 and Python 3 have approximately nothing in common, and "the bug" here 
should already be impossible in Python 3 (but I can't check that, because I 
don't have a platform that does double-rounding).  I already pointed out (in my 
2015-07-05 15:42 note) that Python 3 uses "only integers" in most cases.
"It's easy to replace int(i * random.random()) with randint(0, i)".  You didn't 
say that was your _intent_, and I didn't guess it.  In that case you also have 
to weigh in the considerable extra expense of adding another Python-level 
function call.  The speed of these things is important, and it's annoying 
enough just to add the expense of calling the C-level `min()`.

----------

_______________________________________
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

Reply via email to