Skip to content

Conversation

@andersk
Copy link
Contributor

@anderskandersk 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. Fixespython#123968. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@Eclips4Eclips4 requested review from hugovk and removed request for rhettingerSeptember 11, 2024 19:55
@Eclips4Eclips4 added the needs backport to 3.13 bugs and security fixes label Sep 12, 2024
@hugovkhugovk merged commit a362c41 into python:mainSep 12, 2024
@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

Thanks!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 12, 2024
…onGH-123971) (cherry picked from commit a362c41) Co-authored-by: Anders Kaseorg <andersk@mit.edu>
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.13 bugs and security fixes label Sep 12, 2024
@anderskandersk 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 <andersk@mit.edu>
Sign up for freeto 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

@andersk@hugovk@Eclips4