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 belopolsky, mark.dickinson, rhettinger, terry.reedy, vstinner
Date 2010-06-23.08:41:51
SpamBayes Score 0.0403933
Marked as misclassified No
Message-id <>
Either of these looks good to me.

If the last line of the second is changed from "return int(r) % n" to "return int(r) // (N // n)" then it'll use the high-order bits of random()  instead of the low-order bits.  This doesn't matter for MT, but might matter for subclasses of Random using a different underlying generator.
Date User Action Args
2010-06-23 08:41:55mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, terry.reedy, belopolsky, vstinner
2010-06-23 08:41:55mark.dickinsonsetmessageid: <>
2010-06-23 08:41:51mark.dickinsonlinkissue9025 messages
2010-06-23 08:41:51mark.dickinsoncreate