mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] gh-106973: Change non-integral to non-integer in "3.12 What's New" (GH-106984) (#106986)
Co-authored-by: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
This commit is contained in:
parent
d0176ed911
commit
9cbde7c6ce
1 changed files with 1 additions and 1 deletions
|
@ -1455,7 +1455,7 @@ Changes in the Python API
|
||||||
|
|
||||||
* Removed ``randrange()`` functionality deprecated since Python 3.10. Formerly,
|
* Removed ``randrange()`` functionality deprecated since Python 3.10. Formerly,
|
||||||
``randrange(10.0)`` losslessly converted to ``randrange(10)``. Now, it raises a
|
``randrange(10.0)`` losslessly converted to ``randrange(10)``. Now, it raises a
|
||||||
:exc:`TypeError`. Also, the exception raised for non-integral values such as
|
:exc:`TypeError`. Also, the exception raised for non-integer values such as
|
||||||
``randrange(10.5)`` or ``randrange('10')`` has been changed from :exc:`ValueError` to
|
``randrange(10.5)`` or ``randrange('10')`` has been changed from :exc:`ValueError` to
|
||||||
:exc:`TypeError`. This also prevents bugs where ``randrange(1e25)`` would silently
|
:exc:`TypeError`. This also prevents bugs where ``randrange(1e25)`` would silently
|
||||||
select from a larger range than ``randrange(10**25)``.
|
select from a larger range than ``randrange(10**25)``.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue