From 92c593e71519286a50604d1bb6c00544092beec4 Mon Sep 17 00:00:00 2001 From: zipperer <47086307+zipperer@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:25:05 -0600 Subject: [PATCH 1/2] stdlib.rst: mathematics section: random.random: add detail to comment on range of random.random() --- Doc/tutorial/stdlib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst index 6bae279c5e9cde..07fdb54b0e208f 100644 --- a/Doc/tutorial/stdlib.rst +++ b/Doc/tutorial/stdlib.rst @@ -153,7 +153,7 @@ The :mod:`random` module provides tools for making random selections:: 'apple' >>> random.sample(range(100), 10) # sampling without replacement [30, 83, 16, 4, 8, 81, 41, 50, 18, 33] - >>> random.random() # random float + >>> random.random() # random float from interval [0.0, 1.0) 0.17970987693706186 >>> random.randrange(6) # random integer chosen from range(6) 4 From a8e7364d8959dee8af045cd69599a0950c8b8cb6 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 9 Nov 2023 08:39:50 -0600 Subject: [PATCH 2/2] Update stdlib.rst Missing article --- Doc/tutorial/stdlib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst index 07fdb54b0e208f..63f4b5e1ce0207 100644 --- a/Doc/tutorial/stdlib.rst +++ b/Doc/tutorial/stdlib.rst @@ -153,7 +153,7 @@ The :mod:`random` module provides tools for making random selections:: 'apple' >>> random.sample(range(100), 10) # sampling without replacement [30, 83, 16, 4, 8, 81, 41, 50, 18, 33] - >>> random.random() # random float from interval [0.0, 1.0) + >>> random.random() # random float from the interval [0.0, 1.0) 0.17970987693706186 >>> random.randrange(6) # random integer chosen from range(6) 4