Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's new in 3.12: fix typo: non-integral -> non-integer #106973

Closed
hugovk opened this issue Jul 21, 2023 · 4 comments
Closed

What's new in 3.12: fix typo: non-integral -> non-integer #106973

hugovk opened this issue Jul 21, 2023 · 4 comments
Labels
docs Documentation in the Doc dir easy

Comments

@hugovk
Copy link
Member

hugovk commented Jul 21, 2023

Documentation

https://docs.python.org/3.12/whatsnew/3.12.html#changes-in-the-python-api says:

  • 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.)

"non-integral" should be "non-integer"

Linked PRs

@pochmann
Copy link
Contributor

What's wrong with "non-integral"?

@hugovk
Copy link
Member Author

hugovk commented 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:

image

@polynomialherder
Copy link
Contributor

Even though integral means "having to do with integers" or "integer-valued", integer makes more sense here from an accessibility and consistency standpoint

SebastiaanZ added a commit to SebastiaanZ/pypethon that referenced this issue Jul 22, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 22, 2023
…ew" (pythonGH-106984)

(cherry picked from commit d55b4da)

Co-authored-by: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
hugovk pushed a commit that referenced this issue Jul 22, 2023
…New" (GH-106984) (#106986)

Co-authored-by: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
@pochmann
Copy link
Contributor

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...

@hugovk hugovk closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir easy
Projects
None yet
Development

No branches or pull requests

3 participants