Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: sys.__unraisablehook__ and bytearray.hex separators are new in 3.8 #17884

Open

Conversation

@gousaiyang
Copy link

gousaiyang commented Jan 7, 2020

Minor fix in documentation:

  • sys.__unraisablehook__ is new in version 3.8
  • Optional sep and bytes_per_sep parameters for bytearray.hex is also supported in Python 3.8 (just like bytes.hex)
@@ -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.

Copy link
@tirkarthi

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.

Copy link
@gousaiyang

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.

Copy link
@gousaiyang

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
Projects
None yet
4 participants
You can’t perform that action at this time.