File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -142,10 +142,11 @@ Functions for integers
142
142
143
143
.. function :: getrandbits(k)
144
144
145
- Returns a Python integer with *k * random bits. This method is supplied with
146
- the MersenneTwister generator and some other generators may also provide it
147
- as an optional part of the API. When available, :meth: `getrandbits ` enables
148
- :meth: `randrange ` to handle arbitrarily large ranges.
145
+ Returns a non-negative Python integer with *k * random bits. This method
146
+ is supplied with the MersenneTwister generator and some other generators
147
+ may also provide it as an optional part of the API. When available,
148
+ :meth: `getrandbits ` enables :meth: `randrange ` to handle arbitrarily large
149
+ ranges.
149
150
150
151
.. versionchanged :: 3.9
151
152
This method now accepts zero for *k *.
You can’t perform that action at this time.
0 commit comments