Skip to content

Commit af7553a

Browse files
authored
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"
1 parent 1c5d1d7 commit af7553a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Doc/library/stdtypes.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,10 @@ Notes:
434434
Negative shift counts are illegal and cause a :exc:`ValueError` to be raised.
435435

436436
(2)
437-
A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``
438-
without overflow check.
437+
A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``.
439438

440439
(3)
441-
A right shift by *n* bits is equivalent to division by ``pow(2, n)`` without
442-
overflow check.
440+
A right shift by *n* bits is equivalent to floor division by ``pow(2, n)``.
443441

444442
(4)
445443
Performing these calculations with at least one extra sign extension bit in

0 commit comments

Comments
 (0)