Skip to content

[3.13] gh-149221:Fix binomialvariate Function for random module - #149279

Merged
hugovk merged 7 commits into
python:3.13from
lighting9999:patch-1
Jul 29, 2026
Merged

[3.13] gh-149221:Fix binomialvariate Function for random module#149279
hugovk merged 7 commits into
python:3.13from
lighting9999:patch-1

Conversation

@lighting9999

@lighting9999 lighting9999 commented May 2, 2026

Copy link
Copy Markdown
Contributor

Handle ValueError from random() in log2 calculation.
@read-the-docs-community

read-the-docs-community Bot commented May 2, 2026

Copy link
Copy Markdown

lighting9999 and others added 2 commits May 2, 2026 21:53
Refactor exception handling for ValueError in random.py
@StanFromIreland StanFromIreland changed the title [3.13]gh-149221:Fix binomialvariate Function for random module [3.13] gh-149221:Fix binomialvariate Function for random module May 2, 2026

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the lint issues, see #149288.

@bedevere-app

bedevere-app Bot commented May 2, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@hugovk

hugovk commented Jul 29, 2026

Copy link
Copy Markdown
Member

Updated to fix lint and indent, and also add the missing comment:

https://github.com/python/cpython/blob/3.14/Lib/random.py#L839-L843

This and the 3.14 backport are also missing the test from the original PR:

https://github.com/python/cpython/pull/149222/changes

I've added it here, and have opened another PR to add to 3.14: #154879.

Comment thread Lib/random.py
@hugovk
hugovk merged commit d475f4d into python:3.13 Jul 29, 2026
43 of 44 checks passed
@lighting9999
lighting9999 deleted the patch-1 branch July 30, 2026 07:18
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