[issue27072] random.getrandbits is limited to 2**31-1 bits on 64-bit Windows

Raymond Hettinger report at bugs.python.org
Sun Jun 5 20:17:45 EDT 2016


Raymond Hettinger added the comment:

Sorry Steven, I'm going to mark this as rejected on the grounds that it is likely to do more harm than good.  We could in fact make the range larger but it easily creates terrible effects (encouraging bad design and creating a non-interruptable, long-running, total-memory-filling call).  

While we do allow ``2 ** 50 ** 50``, that call is more deliberately asking for trouble than getrandbits(2**60).  If someone really needed that number of bits, it isn't hard to multiple calls to getrandbits() and combine the results, deliberately and interruptably.

----------
resolution:  -> rejected
status: open -> closed

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


More information about the Python-bugs-list mailing list