GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.13] gh-123968: Fix lower bound for `python -m random --float` (GH-123971) by miss-islington · Pull Request #124009 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 12, 2024 •
edited by hugovk
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #123968.

(cherry picked from commit a362c41)

Co-authored-by: Anders Kaseorg [email protected]

  • Issue: python -m random --float N should pick a float between 0 and N, not 1 and N #123968

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@andersk @miss-islington
pythongh-123968: Fix lower bound for python -m random --float (pyth…
d556d27
…onGH-123971)

(cherry picked from commit a362c41)

Co-authored-by: Anders Kaseorg <[email protected]>
@miss-islington
miss-islington requested a review from rhettinger as a code owner September 12, 2024 13:54
@bedevere-app bedevere-app Bot added the awaiting review label Sep 12, 2024
This was referenced Sep 12, 2024
gh-123968: Fix lower bound for python -m random --float #123971
Merged
python -m random --float N should pick a float between 0 and N, not 1 and N #123968
Closed
@hugovk
hugovk requested review from hugovk and removed request for rhettinger September 12, 2024 13:54
hugovk
hugovk approved these changes Sep 12, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Sep 12, 2024
@hugovk
hugovk requested a review from Yhg1s September 12, 2024 14:54
andersk
andersk approved these changes Sep 16, 2024
View reviewed changes
@Yhg1s

Yhg1s commented Sep 23, 2024

Copy link
Copy Markdown
Member

Given that this is a new feature, yeah, let's get the fix into 3.13.0 so people don't end up relying on the less desirable behaviour.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Yhg1s
Yhg1s merged commit 7b8affa into python:3.13 Sep 23, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 23, 2024
@mahlzahn

mahlzahn commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

The current docs do not reflect this fix, yet:
https://docs.python.org/3.13/library/random.html#random-cli

-f
--float
Print a random floating-point number between 1 and N inclusive, using uniform().

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Sep 25, 2024

Copy link
Copy Markdown
Member

It's because this PR did not update the docs.

@mahlzahn, would you like to create a PR to fix it?

This is the file to edit:
https://github.com/python/cpython/blob/main/Doc/library/random.rst

No need for a news entry, and we can reuse issue number gh-123968 for the PR title prefix.

andersk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mahlzahn mahlzahn mentioned this pull request Sep 25, 2024
gh-123968: fix -f/--float command line option description #124517
Merged
nanjekyejoannah pushed a commit that referenced this pull request Sep 25, 2024
@mahlzahn @skirpichev
gh-123968: fix -f/--float command line option description (#124517)
f8651a2
* fix -f/--float command line option description

See gh-123968 gh-124009

* Update Doc/library/random.rst

---------

Co-authored-by: Sergey B Kirpichev <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 25, 2024
@mahlzahn @skirpichev @miss-islington
pythongh-123968: fix -f/--float command line option description (pyth…
6fed94a
…onGH-124517)

* fix -f/--float command line option description

See pythongh-123968 pythongh-124009

* Update Doc/library/random.rst

---------

(cherry picked from commit f8651a2)

Co-authored-by: Robert Wolff <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
@miss-islington miss-islington mentioned this pull request Sep 25, 2024
[3.13] gh-123968: fix -f/--float command line option description (GH-124517) #124523
Merged
Yhg1s pushed a commit that referenced this pull request Sep 26, 2024
@miss-islington @mahlzahn @skirpichev
[3.13] gh-123968: fix -f/--float command line option description (GH-…
6607c72
…124517) (#124523)

gh-123968: fix -f/--float command line option description (GH-124517)

* fix -f/--float command line option description

See gh-123968 gh-124009

* Update Doc/library/random.rst

---------

(cherry picked from commit f8651a2)

Co-authored-by: Robert Wolff <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
@miss-islington
miss-islington deleted the backport-a362c41-3.13 branch January 2, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes
@Yhg1s Yhg1s Awaiting requested review from Yhg1s
+1 more reviewer
@andersk andersk andersk approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@miss-islington @Yhg1s @mahlzahn @hugovk @andersk
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.