-
-
Notifications
You must be signed in to change notification settings - Fork 32k
secrets.randbits
returns only nonnegative integers
#123789
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
Labels
docs
Documentation in the Doc dir
Comments
PR welcome! A |
hauntsaninja
pushed a commit
that referenced
this issue
Sep 8, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Sep 8, 2024
…thonGH-123801) (cherry picked from commit beee91c) Co-authored-by: Wulian <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Sep 8, 2024
…thonGH-123801) (cherry picked from commit beee91c) Co-authored-by: Wulian <[email protected]>
This was referenced Sep 8, 2024
Now we can close this🎉 |
Looks good. Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation
The docstring of
secrets.randbits
reads, in its entirety, "Return an int with k random bits." In fact, it only generates nonnegative integers, like its sister functionrandom.getrandbits
.Linked PRs
secrets.randbits
returns only non-negative int #123801secrets.randbits
returns only non-negative int (GH-123801) #123830secrets.randbits
returns only non-negative int (GH-123801) #123831The text was updated successfully, but these errors were encountered: