This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients gurnec, mark.dickinson, rhettinger, serhiy.storchaka, skip.montanaro
Date 2015-04-17.08:20:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429258856.46.0.207161880418.issue23974@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-04-17 08:20:56mark.dickinsonsetrecipients: + mark.dickinson, skip.montanaro, rhettinger, serhiy.storchaka, gurnec
2015-04-17 08:20:56mark.dickinsonsetmessageid: <1429258856.46.0.207161880418.issue23974@psf.upfronthosting.co.za>
2015-04-17 08:20:56mark.dickinsonlinkissue23974 messages
2015-04-17 08:20:56mark.dickinsoncreate