Skip to content

3.11 random.randrange: fix typo: non-integral -> non-integer #106975

Closed
@hugovk

Description

@hugovk

Documentation

Similar to #106973, https://docs.python.org/3.11/library/random.html?highlight=randrange#random.randrange says:

Deprecated since version 3.10: The automatic conversion of non-integer types to equivalent integers is deprecated. Currently randrange(10.0) is losslessly converted to randrange(10). In the future, this will raise a TypeError.

Deprecated since version 3.10: The exception raised for non-integral values such as randrange(10.5) or randrange('10') will be changed from ValueError to TypeError.

non-integral should be non-integer.

This fix should be made to the 3.11 branch, because the text has been remove from main/3.12.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc direasy

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions