summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-08-30 11:16:34 (GMT)
committerGitHub <noreply@github.com>2022-08-30 11:16:34 (GMT)
commit9389e2f08c9fcd998fc758a32d6e554a407bbc7c (patch)
treebd74b486f3762ae3b093f48798f9ef2039205f9d
parent0a096e01c65aab42dc2a4a0100402e53a8be603a (diff)
downloadcpython-9389e2f08c9fcd998fc758a32d6e554a407bbc7c.zip
cpython-9389e2f08c9fcd998fc758a32d6e554a407bbc7c.tar.gz
cpython-9389e2f08c9fcd998fc758a32d6e554a407bbc7c.tar.bz2
Docs: Improve clarity for bytes.hex() (GH-95257)
(cherry picked from commit 860fa351452de1502da12ec6f027d3f72dfc309f) Co-authored-by: Tim Burke <tim.burke@gmail.com>
-rw-r--r--Doc/library/stdtypes.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 5c0d259..529dae8 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -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('-')