Antti Haapala added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27742>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to