[3.13] gh-149221:Fix binomialvariate Function for random module - #149279
Conversation
Handle ValueError from random() in log2 calculation.
Documentation build overview
450 files changed ·
|
Refactor exception handling for ValueError in random.py
StanFromIreland
left a comment
There was a problem hiding this comment.
Please fix the lint issues, see #149288.
|
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 |
|
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. |
binomialvariatefunction returns wrong results #149221