From: Zackery Spytz Date: Tue, 26 May 2020 08:16:34 +0000 (-0600) Subject: bpo-39301: State that floor division is used for right shift operations (GH-20347) X-Git-Tag: v3.10.0a1~816 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af7553ac95a96713be847dd45bc5a8aeb0a75955;p=thirdparty%2FPython%2Fcpython.git 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" --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 4e7729c83f49..6a9fdcb38d24 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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