Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add doc updates
  • Loading branch information
rhettinger committed Oct 15, 2021
commit 738e0904f7b5e97d70ae82d9c79ebc9804173364
12 changes: 3 additions & 9 deletions Doc/library/random.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,9 @@ Functions for integers
values. Formerly it used a style like ``int(random()*n)`` which could produce
slightly uneven distributions.

.. deprecated:: 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 :exc:`TypeError`.

.. deprecated:: 3.10
The exception raised for non-integral values such as ``randrange(10.5)``
or ``randrange('10')`` will be changed from :exc:`ValueError` to
:exc:`TypeError`.
.. versionchanged:: 3.11
Automatic conversion of non-integer types is no longer supported.
Float arguments such as ``randrange(10.0)`` now raise a :exc:`TypeError`.

.. function:: randint(a, b)

Expand Down