bpo-40282: Allow random.getrandbits(0) (GH-19539)

This commit is contained in:
Antoine Pitrou 2020-04-17 19:32:14 +02:00 committed by GitHub
parent d7c657d4b1
commit 75a3378810
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 44 deletions

View file

@ -111,6 +111,9 @@ Bookkeeping functions
as an optional part of the API. When available, :meth:`getrandbits` enables
:meth:`randrange` to handle arbitrarily large ranges.
.. versionchanged:: 3.9
This method now accepts zero for *k*.
.. function:: randbytes(n)