From 0a60e48412c430554219db3b3d3aa211c37550a6 Mon Sep 17 00:00:00 2001 From: nixawk Date: Mon, 16 Apr 2018 22:02:21 -0500 Subject: [PATCH 1/3] Fix secrets.randbelow docstring --- Lib/secrets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/secrets.py b/Lib/secrets.py index 130434229e96a9..285d74becf9b28 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 int in the range(0, n).""" if exclusive_upper_bound <= 0: raise ValueError("Upper bound must be positive.") return _sysrand._randbelow(exclusive_upper_bound) From 01f30f0755c664a635bd5d9038e11f0c1292db57 Mon Sep 17 00:00:00 2001 From: nixawk Date: Mon, 16 Apr 2018 22:15:58 -0500 Subject: [PATCH 2/3] add Misc/NEWS.d/ --- .../next/Library/2018-04-16-10-13-00.bpo-33292.hellonixawk.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2018-04-16-10-13-00.bpo-33292.hellonixawk.rst 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 From 69cfabc421410133f3518d08b1e6ae7c7b09361b Mon Sep 17 00:00:00 2001 From: nixawk Date: Wed, 18 Apr 2018 04:49:55 -0500 Subject: [PATCH 3/3] update secrets.randbelow docstring --- Lib/secrets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/secrets.py b/Lib/secrets.py index 285d74becf9b28..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)