You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What's new in 3.12: fix typo: non-integral -> non-integer #106973
Removed randrange() functionality deprecated since Python 3.10. Formerly, randrange(10.0) losslessly converted to randrange(10). Now, it raises a TypeError. Also, the exception raised for non-integral values such as randrange(10.5) or randrange('10') has been changed from ValueError to TypeError. This also prevents bugs where randrange(1e25) would silently select from a larger range than randrange(10**25). (Originally suggested by Serhiy Storchaka gh-86388.)
Even though integral means "having to do with integers" or "integer-valued", integer makes more sense here from an accessibility and consistency standpoint
And we just used "non-integer" for this in the previous note
For types. It said "non-integer types" and "non-integral values". Looks alright and intentional to me, not like a typo. But I guess integer works for both and seems more popular...
Activity
pochmann commentedon Jul 21, 2023
What's wrong with "non-integral"?
hugovk commentedon Jul 22, 2023
Referring to the original issue #86388 and its PRs, it's about the handling of things that are not integers such as floats and strings.
And we just used "non-integer" for this in the previous note at https://docs.python.org/3.11/library/random.html#random.randrange:
polynomialherder commentedon Jul 22, 2023
Even though integral means "having to do with integers" or "integer-valued", integer makes more sense here from an accessibility and consistency standpoint
pythongh-106973: Change non-integral to non-integer in 3.12 docs
gh-106973: Change non-integral to non-integer in "3.12 What's New" (#…
pythongh-106973: Change non-integral to non-integer in "3.12 What's N…
[3.12] gh-106973: Change non-integral to non-integer in "3.12 What's …
pochmann commentedon Jul 22, 2023
For types. It said "non-integer types" and "non-integral values". Looks alright and intentional to me, not like a typo. But I guess integer works for both and seems more popular...