-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-32891: rename numbers.Integral to numbers.Integer #25552
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
Conversation
|
@terryjreedy, I would appreciate your review, as issue creator. The patch itself is tiny (Lib/numbers.py, Doc/library/numbers.rst and few places where the new class is referenced, instead of the old). The rest is my attempt to make docs more consistent in using integer vs integral. I can split that part to a separate commit, if this simplify review somehow. BTW, PEP 3141 references the old naming scheme. Perhaps, it must be updated? |
|
On Mon, Apr 26, 2021 at 12:20:04AM -0700, Mark Dickinson wrote:
@mdickinson commented on this pull request.
══════════════════════════════════════════════════════════════════════════
In [1]Doc/library/decimal.rst:
> @@ -1352,7 +1352,7 @@ In addition to the three supplied contexts, new contexts can be created with the
Return ``x`` to the power of ``y``, reduced modulo ``modulo`` if given.
With two arguments, compute ``x**y``. If ``x`` is negative then ``y``
- must be integral. The result will be inexact unless ``y`` is integral and
+ must be integer. The result will be inexact unless ``y`` is integer and
Here and in lots of other places in this PR, the new text isn't
grammatically correct. The word "integer" is a noun, but here you're
trying to use it as an adjective.
Well, it seems that Python comments invent a new noun, integral (as a
synonym for integer). I did same, but invented an adjective)
But you are correct, of course.
I'd strongly recommend splitting this PR up into two separate PRs: one for
the Integral -> Integer change
I hope, I did all reversions.
|
That would also be wrong, but in all the cases I've seen in comments and documentation, "integral" is being used as an adjective, not a noun. Do you have counterexamples? |
I'm not sure how to reproduce pickle problem, mentioned by Serhiy in the issue thread. Seems to be working...
There are few things that might be changed too, but I'm not sure they are suitable for this pr:
_Py_InIntegralTypeRange->_Py_InIntegerTypeRange)to_integral()->to_integer())https://bugs.python.org/issue32891