summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-05-26 08:33:42 (GMT)
committerGitHub <noreply@github.com>2020-05-26 08:33:42 (GMT)
commitc2a177adf3575d4eb81030fba851f78d7a8e3f51 (patch)
treeca470a44bef586edeeca67bd07a7351ef7154444 /Doc/library
parent5c1d745da5e1166a8724b619060165dcf3949e93 (diff)
downloadcpython-c2a177adf3575d4eb81030fba851f78d7a8e3f51.zip
cpython-c2a177adf3575d4eb81030fba851f78d7a8e3f51.tar.gz
cpython-c2a177adf3575d4eb81030fba851f78d7a8e3f51.tar.bz2
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 af7553ac95a96713be847dd45bc5a8aeb0a75955) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/stdtypes.rst6
1 files changed, 2 insertions, 4 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 8cc57c3..ccd2f99 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