From f31e5897919ed0c1f04bc676c465051a03fb045b Mon Sep 17 00:00:00 2001 From: Aditya Borikar Date: Tue, 28 May 2024 14:52:08 -0600 Subject: [PATCH 1/6] Use widely used non-integer instead of non-integral While both terms can be used to mean the same thing, "non-integer number" is the more precise and commonly used term. "Non-integral number" might sometimes be used in a broader sense in certain mathematical contexts, but it generally carries the same meaning as "non-integer number" when referring to real numbers. --- Doc/library/functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 4617767a71be18..040a281a5fcc7c 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1559,7 +1559,7 @@ are always available. They are listed here in alphabetical order. unless the second argument is negative; in that case, all arguments are converted to float and a float result is delivered. For example, ``pow(10, 2)`` returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative base of - type :class:`int` or :class:`float` and a non-integral exponent, a complex + type :class:`int` or :class:`float` and a non-integer exponent, a complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value close to ``3j``. From d5dd0d7d87b8d3ac99b291cf17bc7cec36dec5e6 Mon Sep 17 00:00:00 2001 From: Aditya Borikar Date: Tue, 28 May 2024 15:18:13 -0600 Subject: [PATCH 2/6] Correct documentation for signed and unsigned int in an array --- Doc/library/array.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/array.rst b/Doc/library/array.rst index d34a1888342e27..71df24d68f0576 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -30,9 +30,9 @@ defined: +-----------+--------------------+-------------------+-----------------------+-------+ | ``'H'`` | unsigned short | int | 2 | | +-----------+--------------------+-------------------+-----------------------+-------+ -| ``'i'`` | signed int | int | 2 | | +| ``'i'`` | signed int | int | 4 | | +-----------+--------------------+-------------------+-----------------------+-------+ -| ``'I'`` | unsigned int | int | 2 | | +| ``'I'`` | unsigned int | int | 4 | | +-----------+--------------------+-------------------+-----------------------+-------+ | ``'l'`` | signed long | int | 4 | | +-----------+--------------------+-------------------+-----------------------+-------+ From 7e42106de9787470ea33076dc2c8a7e23386bb49 Mon Sep 17 00:00:00 2001 From: Aditya Borikar Date: Wed, 29 May 2024 08:12:12 -0600 Subject: [PATCH 3/6] Revert changes in arrays.rst --- Doc/library/array.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 71df24d68f0576..d34a1888342e27 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -30,9 +30,9 @@ defined: +-----------+--------------------+-------------------+-----------------------+-------+ | ``'H'`` | unsigned short | int | 2 | | +-----------+--------------------+-------------------+-----------------------+-------+ -| ``'i'`` | signed int | int | 4 | | +| ``'i'`` | signed int | int | 2 | | +-----------+--------------------+-------------------+-----------------------+-------+ -| ``'I'`` | unsigned int | int | 4 | | +| ``'I'`` | unsigned int | int | 2 | | +-----------+--------------------+-------------------+-----------------------+-------+ | ``'l'`` | signed long | int | 4 | | +-----------+--------------------+-------------------+-----------------------+-------+ From 94191799a44edec6590b37987272f4eb9a3396f6 Mon Sep 17 00:00:00 2001 From: Aditya Borikar Date: Tue, 4 Jun 2024 12:18:03 -0600 Subject: [PATCH 4/6] Add helpful example --- Doc/library/functions.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 040a281a5fcc7c..ad1da5ba4e99b0 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1561,7 +1561,9 @@ are always available. They are listed here in alphabetical order. returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative base of type :class:`int` or :class:`float` and a non-integer exponent, a complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value close - to ``3j``. + to ``3j``. Whereas, for a negative base of type :class:`int` or :class:`float` + with an integral exponent, a real number is delivered. For example, + ``pow(-9, 2.0)`` returns ``81.0``. For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must also be of integer type and *mod* must be nonzero. If *mod* is present and From 752102b4fa7dc07adefff1490f6ad02c58c3f0a2 Mon Sep 17 00:00:00 2001 From: Aditya Borikar Date: Tue, 4 Jun 2024 12:43:28 -0600 Subject: [PATCH 5/6] Revert old wording --- Doc/library/functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index ad1da5ba4e99b0..3ba7cddcae7589 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1559,7 +1559,7 @@ are always available. They are listed here in alphabetical order. unless the second argument is negative; in that case, all arguments are converted to float and a float result is delivered. For example, ``pow(10, 2)`` returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative base of - type :class:`int` or :class:`float` and a non-integer exponent, a complex + type :class:`int` or :class:`float` and a non-integral exponent, a complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value close to ``3j``. Whereas, for a negative base of type :class:`int` or :class:`float` with an integral exponent, a real number is delivered. For example, From 3ad9f3b2868217a7e06c9e8b629b2808ca5a5c14 Mon Sep 17 00:00:00 2001 From: Aditya Borikar Date: Wed, 5 Jun 2024 14:37:21 -0600 Subject: [PATCH 6/6] Remove trailing whitespace and fix example wording --- Doc/library/functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 3ba7cddcae7589..1d82f92ea67857 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1562,7 +1562,7 @@ are always available. They are listed here in alphabetical order. type :class:`int` or :class:`float` and a non-integral exponent, a complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value close to ``3j``. Whereas, for a negative base of type :class:`int` or :class:`float` - with an integral exponent, a real number is delivered. For example, + with an integral exponent, a float result is delivered. For example, ``pow(-9, 2.0)`` returns ``81.0``. For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must