[issue14591] Value returned by random.random() out of valid range

Mark Dickinson report at bugs.python.org
Thu Apr 19 09:16:56 CEST 2012


Mark Dickinson <dickinsm at gmail.com> added the comment:

The latest patch has the disadvantage that it'll often change the behaviour of jumpahead for people on 32-bit platforms, which may lead to unnecessary breakage.

Here's a better version that only fixes mt[0] in the unlikely (but possible) event that mt[1] through mt[623] are all zero.  That should mean that users on 32-bit machines who are depending on jumpahead being reproducible won't notice (unless they're very unlucky indeed).

----------
Added file: http://bugs.python.org/file25268/random_jumpahead_3.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14591>
_______________________________________


More information about the Python-bugs-list mailing list