Skip to content

Commit 64508fc

Browse files
committed
gh-143834: Fix PyLong_AsNativeBytes docs for negative number padding
1 parent bab1d7a commit 64508fc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Doc/c-api/long.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
453453
454454
Otherwise, returns the number of bytes required to store the value.
455455
If this is equal to or less than *n_bytes*, the entire value was copied.
456-
All *n_bytes* of the buffer are written: large buffers are padded with
457-
zeroes.
456+
All *n_bytes* of the buffer are written: remaining bytes filled by copies of the sign bit.
458457
459458
If the returned value is greater than *n_bytes*, the value was
460459
truncated: as many of the lowest bits of the value as could fit are written,

0 commit comments

Comments
 (0)