Author tim.peters
Recipients Serge Anuchin, mark.dickinson, pitrou, r.david.murray, rhettinger, serhiy.storchaka, skrah, steven.daprano, tim.peters, vstinner
Date 2015-07-09.23:59:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Victor, if people want to use getrandbits(), we should backport the Python3 code, not reinvent it from scratch.

Note too Mark's comment:  "There are several places in the source where something of the form `int(i * random.random())` is used".  The `min()` trick is relatively easy to apply via simple, local editing of such places.  

Your "It doesn't handle negative numbers nor empty ranges" should be a hint about what a pain it is to rewrite everything wholesale to use a _fundamentally_ different method.
Date User Action Args
2015-07-09 23:59:05tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, pitrou, vstinner, steven.daprano, r.david.murray, skrah, serhiy.storchaka, Serge Anuchin
2015-07-09 23:59:04tim.peterssetmessageid: <>
2015-07-09 23:59:04tim.peterslinkissue24567 messages
2015-07-09 23:59:04tim.peterscreate