Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upDoc: sys.__unraisablehook__ and bytearray.hex separators are new in 3.8 #17884
+20
−0
Conversation
@@ -2518,8 +2518,26 @@ objects. | |||
>>> bytearray(b'\xf0\xf1\xf2').hex() | |||
'f0f1f2' | |||
If you want to make the hex string easier to read, you can specify a |
This comment has been minimized.
This comment has been minimized.
tirkarthi
Jan 9, 2020
Contributor
This was already documented at https://github.com/python/cpython/pull/13578/files#diff-7498e907ba97646df434a0eb583c6909R2407 to be new in Python 3.8 and looks like a duplicate addition.
This comment has been minimized.
This comment has been minimized.
gousaiyang
Jan 9, 2020
Author
The case is that bytes.hex(sep=..., bytes_per_sep=...)
is already documented to be new in 3.8, but bytearray.hex(sep=..., bytes_per_sep=...)
is not (the versionchanged:: 3.8
indicator is missing). The "If you want to make the hex string easier to read" paragraph is actually copied from the document of bytes.hex
(just in the PR you mentioned).
This comment has been minimized.
This comment has been minimized.
gousaiyang
Jan 9, 2020
Author
And memoryview.hex(sep=..., bytes_per_sep=...)
also need to be marked as new in 3.8.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
gousaiyang commentedJan 7, 2020
Minor fix in documentation:
sys.__unraisablehook__
is new in version 3.8sep
andbytes_per_sep
parameters forbytearray.hex
is also supported in Python 3.8 (just likebytes.hex
)