[Python-checkins] bpo-42559: Not that getrandbits() is non-negative. (GH-23843) (GH-23851)
rhettinger
webhook-mailer at python.org
Fri Dec 18 22:10:16 EST 2020
https://github.com/python/cpython/commit/d458d8dab0abaf781c923f80f8eb832d0c683e88
commit: d458d8dab0abaf781c923f80f8eb832d0c683e88
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2020-12-18T19:10:06-08:00
summary:
bpo-42559: Not that getrandbits() is non-negative. (GH-23843) (GH-23851)
files:
M Doc/library/random.rst
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 8154dfc18ccc6..0e703251259aa 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -142,10 +142,11 @@ Functions for integers
.. function:: getrandbits(k)
- Returns a Python integer with *k* random bits. This method is supplied with
- the MersenneTwister generator and some other generators may also provide it
- as an optional part of the API. When available, :meth:`getrandbits` enables
- :meth:`randrange` to handle arbitrarily large ranges.
+ Returns a non-negative Python integer with *k* random bits. This method
+ is supplied with the MersenneTwister generator and some other generators
+ may also provide it 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*.
More information about the Python-checkins
mailing list