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 pitrou
Recipients Serge Anuchin, mark.dickinson, pitrou, r.david.murray, rhettinger, serhiy.storchaka, skrah, steven.daprano, tim.peters, vstinner
Date 2015-07-09.23:09:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1436483358.61.0.159619309477.issue24567@psf.upfronthosting.co.za>
In-reply-to
Content
> I suppose the simplest "fix" would be to replace relevant instances of
> 
> int(random() * N)
> 
> with
> 
> min(int(random() * N), N-1)

That sounds simple and generic. It skews the distribution a tiny little bit, but it doesn't sound significant (perhaps Mark would disagree).
History
Date User Action Args
2015-07-09 23:09:18pitrousetrecipients: + pitrou, tim.peters, rhettinger, mark.dickinson, vstinner, steven.daprano, r.david.murray, skrah, serhiy.storchaka, Serge Anuchin
2015-07-09 23:09:18pitrousetmessageid: <1436483358.61.0.159619309477.issue24567@psf.upfronthosting.co.za>
2015-07-09 23:09:18pitroulinkissue24567 messages
2015-07-09 23:09:18pitroucreate