Docs: Improve clarity for bytes.hex() (GH-95257)

(cherry picked from commit 860fa35145)

Co-authored-by: Tim Burke <tim.burke@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-08-30 04:16:34 -07:00 committed by GitHub
parent 0a096e01c6
commit 9389e2f08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -2508,9 +2508,10 @@ data and are closely related to string objects in a variety of other ways.
If you want to make the hex string easier to read, you can specify a
single character separator *sep* parameter to include in the output.
By default between each byte. A second optional *bytes_per_sep*
parameter controls the spacing. Positive values calculate the
separator position from the right, negative values from the left.
By default, this separator will be included between each byte.
A second optional *bytes_per_sep* parameter controls the spacing.
Positive values calculate the separator position from the right,
negative values from the left.
>>> value = b'\xf0\xf1\xf2'
>>> value.hex('-')