Skip to content

secrets.randbits returns only nonnegative integers #123789

Closed
@Kodiologist

Description

@Kodiologist

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 function random.getrandbits.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions