From 1ad2f90b1ac62c3032499204ac4795c63c49b20b Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Tue, 26 May 2020 02:16:34 -0600 Subject: [PATCH] bpo-39301: State that floor division is used for right shift operations (GH-20347) * 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 --- Doc/library/stdtypes.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 00e1f4c1bf0cf98..3cc2a7d53728ba3 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -435,12 +435,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