Skip to content

Commit b068d89

Browse files
bpo-39301: State that floor division is used for right shift operations (GH-20347) (GH-20416)
* bpo-39301: State that floor division is used for right shift operations * Remove "without overflow check" (cherry picked from commit af7553a) Co-authored-by: Zackery Spytz <[email protected]> Co-authored-by: Zackery Spytz <[email protected]>
1 parent 3269a0e commit b068d89

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
@@ -436,12 +436,10 @@ Notes:
436436
Negative shift counts are illegal and cause a :exc:`ValueError` to be raised.
437437

438438
(2)
439-
A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``
440-
without overflow check.
439+
A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``.
441440

442441
(3)
443-
A right shift by *n* bits is equivalent to division by ``pow(2, n)`` without
444-
overflow check.
442+
A right shift by *n* bits is equivalent to floor division by ``pow(2, n)``.
445443

446444
(4)
447445
Performing these calculations with at least one extra sign extension bit in

0 commit comments

Comments
 (0)