Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-123968: Fix lower bound for python -m random --float #123971

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

andersk
Copy link
Contributor

@andersk andersk commented Sep 11, 2024

python -m random --float N incorrectly used a range between 1 and N of length N - 1. Fix it to use a range between 0 and N of length N, as originally specified in #118131, and as everyone will expect.

`python -m random --float N` incorrectly used a range between 1 and N
of length N - 1.  Fix it to use a range between 0 and N of length N,
as originally specified in python#118131, and as everyone will expect.

Fixes python#123968.

Signed-off-by: Anders Kaseorg <[email protected]>
@Eclips4 Eclips4 requested review from hugovk and removed request for rhettinger September 11, 2024 19:55
@Eclips4 Eclips4 added the needs backport to 3.13 bugs and security fixes label Sep 12, 2024
@hugovk hugovk merged commit a362c41 into python:main Sep 12, 2024
35 checks passed
@miss-islington-app
Copy link

Thanks @andersk for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@hugovk
Copy link
Member

hugovk commented Sep 12, 2024

Thanks!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 12, 2024
@bedevere-app
Copy link

bedevere-app bot commented Sep 12, 2024

GH-124009 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 12, 2024
@andersk andersk deleted the random-float branch September 16, 2024 21:44
Yhg1s pushed a commit that referenced this pull request Sep 23, 2024
…123971) (#124009)

gh-123968: Fix lower bound for `python -m random --float` (GH-123971)
(cherry picked from commit a362c41)

Co-authored-by: Anders Kaseorg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants