Mark Dickinson added the comment:

In the #9025 discussion, reproducibility was a key concern.  Though I note that 
despite the comments there, we *still* have no documented guarantees of 
reproducibility, so maybe it's safe to go ahead and change this.  Raymond?

IMO, the fix from #9025 should be backported.  Note that that fix fixes the 
issue completely: all outputs will occur with equal probability. That's under 
the unrealistic assumption of a perfect source of random bits/words, of course; 
but the key point is that randrange shouldn't introduce any *new* biases that 
aggravate existing ones in the source generator.  Reducing `_maxwidth` would 
just reduce the size of the randrange bias without eliminating it completely: 
if we're going to make any change at all to the source, we should fix the 
problem once and for all.

Another option that avoids breaking reproducibility would be to note the bias 
in the docs, and provide a doc recipe for an unbiased randrange, for those who 
need it.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23974>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to