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 rhettinger
Recipients
Date 2004-02-21.08:17:37
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=80475

This has been fixed for Py2.3.3 and 2.4 as a result of the
automatic conversion between ints and longs.

In 2.2, it is still possible, but the call to int() inside
random.randrange() would be have to be changed to math.floor() 
which can handle the full range.  As the comments indicate,
this was not worth a performance hit.

As a workaround, generate two 16 bit integers and then join
them with (a << 16) | b.  This ought to work for practical
purposes; however, the underlying generator may not be
strong enough to make this a theoretically reliable
transform (i.e. it may dramatically shorten the period of
the composite generator).
History
Date User Action Args
2007-08-23 14:20:08adminlinkissue901285 messages
2007-08-23 14:20:08admincreate