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 ztane
Recipients SilentGhost, mark.dickinson, rhettinger, wrohdewald, ztane
Date 2016-08-12.10:47:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470998842.24.0.520103153092.issue27742@psf.upfronthosting.co.za>
In-reply-to
Content
Anyhow, in this case it is easy to simulate the Python 2 randint behaviour (add checks for hi >= lo if needed):

    >>> random.seed(5, version=1)
    >>> randint_compat = lambda lo, hi: lo + int(random.random() * (hi + 1 - lo))
    >>> randint_compat(0, 9999999)
    6229016
History
Date User Action Args
2016-08-12 10:47:22ztanesetrecipients: + ztane, rhettinger, mark.dickinson, SilentGhost, wrohdewald
2016-08-12 10:47:22ztanesetmessageid: <1470998842.24.0.520103153092.issue27742@psf.upfronthosting.co.za>
2016-08-12 10:47:22ztanelinkissue27742 messages
2016-08-12 10:47:22ztanecreate