]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39301: State that floor division is used for right shift operations (GH-20347...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 26 May 2020 08:34:04 +0000 (01:34 -0700)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 08:34:04 +0000 (09:34 +0100)
* bpo-39301: State that floor division is used for right shift operations

* Remove "without overflow check"
(cherry picked from commit af7553ac95a96713be847dd45bc5a8aeb0a75955)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Doc/library/stdtypes.rst

index c4c4ccd76d5a71b30032f3fbc550ec47d3863db3..c35cb2e11d32d41304a1c23a974773487e5c634c 100644 (file)
@@ -436,12 +436,10 @@ Notes:
    Negative shift counts are illegal and cause a :exc:`ValueError` to be raised.
 
 (2)
-   A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``
-   without overflow check.
+   A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``.
 
 (3)
-   A right shift by *n* bits is equivalent to division by ``pow(2, n)`` without
-   overflow check.
+   A right shift by *n* bits is equivalent to floor division by ``pow(2, n)``.
 
 (4)
    Performing these calculations with at least one extra sign extension bit in