stdlib.rst: mathematics section: random.random: add detail to comment on range of random.random() #111868
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a detail to a comment about
random.random()
. Before this commit, a comment saysrandom.random()
returns arandom float
. After this commit, that comment saysrandom.random()
returns arandom float from interval (0.0, 1.0]
.I propose to add this detail to the comment because it clarifies (for me) what the function returns.
However, this comment occurs in a 'brief tour', and the guide for a brief tour can be terse and expect the reader to go read the relevant page (e.g. in this case, https://docs.python.org/3/library/random.html#random.random) if the reader wants to know more than an overview offers. Given that view, the detail I add in this commit is not warranted.
📚 Documentation preview 📚: https://cpython-previews--111868.org.readthedocs.build/