]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add detail to comment on range of random.random() (gh-111868)
authorzipperer <47086307+zipperer@users.noreply.github.com>
Thu, 9 Nov 2023 14:58:04 +0000 (08:58 -0600)
committerGitHub <noreply@github.com>
Thu, 9 Nov 2023 14:58:04 +0000 (08:58 -0600)
---------

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Doc/tutorial/stdlib.rst

index 6bae279c5e9cde85dfe71f627fea2bfcd5c7838f..63f4b5e1ce0207345b5a631757d5897bf6c87345 100644 (file)
@@ -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 the interval [0.0, 1.0)
    0.17970987693706186
    >>> random.randrange(6)    # random integer chosen from range(6)
    4