8000 Docs: Improve clarity for bytes.hex() (GH-95257) · python/cpython@d9d0d09 · GitHub
[go: up one dir, main page]

Skip to content

Commit d9d0d09

Browse files
Docs: Improve clarity for bytes.hex() (GH-95257)
(cherry picked from commit 860fa35) Co-authored-by: Tim Burke <tim.burke@gmail.com>
1 parent 2e9f29e commit d9d0d09

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/stdtypes.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2548,9 +2548,10 @@ data and are closely related to string objects in a variety of other ways.
25482548

25492549
If you want to make the hex string easier to read, you can specify a
25502550
single character separator *sep* parameter to include in the output.
2551-
By default between each byte. A second optional *bytes_per_sep*
2552-
parameter controls the spacing. Positive values calculate the
2553-
separator position from the right, negative values from the left.
2551+
By default, this separator will be included between each byte.
2552+
A second optional *bytes_per_sep* parameter controls the spacing.
2553+
Positive values calculate the separator position from the right,
2554+
negative values from the left.
25542555

25552556
>>> value = b'\xf0\xf1\xf2'
25562557
>>> value.hex('-')

0 commit comments

Comments
 (0)
0