mirror of
https://github.com/python/cpython
synced 2024-09-04 15:56:13 +00:00
Docs: Improve clarity for bytes.hex() (#95257)
This commit is contained in:
parent
9625de6fab
commit
860fa35145
|
@ -2548,9 +2548,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('-')
|
||||
|
|
Loading…
Reference in a new issue