diff --git a/Lib/secrets.py b/Lib/secrets.py index 130434229e96a9..5eb0d9a8b8e5f5 100644 --- a/Lib/secrets.py +++ b/Lib/secrets.py @@ -25,7 +25,7 @@ choice = _sysrand.choice def randbelow(exclusive_upper_bound): - """Return a random int in the range [0, n).""" + """Return a random integer x satisfying 0 <= x < n.""" if exclusive_upper_bound <= 0: raise ValueError("Upper bound must be positive.") return _sysrand._randbelow(exclusive_upper_bound) diff --git a/Misc/NEWS.d/next/Library/2018-04-16-10-13-00.bpo-33292.hellonixawk.rst b/Misc/NEWS.d/next/Library/2018-04-16-10-13-00.bpo-33292.hellonixawk.rst new file mode 100644 index 00000000000000..d94e2246e5ab7a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-04-16-10-13-00.bpo-33292.hellonixawk.rst @@ -0,0 +1 @@ +Fix randbelow docstring description in secrets module. \ No newline at end of file