bpo-39301: State that floor division is used for right shift operations (GH-20347) (GH-20415)

* bpo-39301: State that floor division is used for right shift operations

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

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
Miss Islington (bot) 2020-05-26 01:33:42 -07:00 committed by GitHub
parent 5c1d745da5
commit c2a177adf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View 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