]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39301: State that floor division is used for right shift operations (GH-20347)
authorZackery Spytz <zspytz@gmail.com>
Tue, 26 May 2020 08:16:34 +0000 (02:16 -0600)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 08:16:34 +0000 (09:16 +0100)
* bpo-39301: State that floor division is used for right shift operations

* Remove "without overflow check"

Doc/library/stdtypes.rst

index 4e7729c83f49a41031769275d376ce525bd22914..6a9fdcb38d24b71516266831cc1bf3081194572e 100644 (file)
@@ -434,12 +434,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