| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -354,6 +354,10 @@ Other language changes | |
| (with :func:`format` or :ref:`f-strings`). | ||
| (Contrubuted by Sergey B Kirpichev in :gh:`87790`.) | ||
|
|
||
| * The :func:`bytes.fromhex` and :func:`bytearray.fromhex` methods now accept | ||
| ASCII :class:`bytes` and :term:`bytes-like objects <bytes-like object>`. | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityQuestion: are bytes also bytes-like objects? if so, you can just link the term. Or more generally, isn't it objects that support the buffer protocol?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYes, but it seems less accessible to users to just link bytes-like object because that dives into a description of the buffer protocol which is lower level than the audience I was writing for in builtins docs. Maybe the fault is with :term:\bytes-like object`` because it could just list types that duck-type like bytes. So I hedged and did both.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYou could sa "that support the buffer protocol such as memoryviews" and add a link to whatever example of a type that supports the buffer protocol you used
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI prefer to say "bytes and bytes-like", it's more explicit.
Sorry, something went wrong.
All reactions
|
||
| (Contributed by Daniel Pope in :gh:`129349`.) | ||
|
|
||
| * ``\B`` in :mod:`regular expression <re>` now matches empty input string. | ||
| Now it is always the opposite of ``\b``. | ||
| (Contributed by Serhiy Storchaka in :gh:`124130`.) | ||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| :meth:`bytes.fromhex` and :meth:`bytearray.fromhex` now accepts ASCII | ||
| :class:`bytes` and :term:`bytes-like objects <bytes-like object>`. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.