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

use bytes.hex/bytes.fromhex instead of binascii #2119

Closed
williballenthin opened this issue Jun 4, 2024 · 0 comments
Closed

use bytes.hex/bytes.fromhex instead of binascii #2119

williballenthin opened this issue Jun 4, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers gsoc Work related to Google Summer of Code project.

Comments

@williballenthin
Copy link
Collaborator

Unrelated to this PR, I think we can replace

b = codecs.decode(s.replace(" ", "").encode("ascii"), "hex")

with:

b = bytes.fromhex(s)

https://docs.python.org/3/library/stdtypes.html#bytes.fromhex

Originally posted by @s-ff in #2080 (review)

@williballenthin williballenthin added enhancement New feature or request good first issue Good for newcomers gsoc Work related to Google Summer of Code project. labels Jun 4, 2024
lakshayletsgo added a commit to lakshayletsgo/capa that referenced this issue Jul 28, 2024
mr-tz added a commit that referenced this issue Aug 9, 2024
* #2119 issue: use bytes.fromhex instead of binascii

---------

Co-authored-by: Moritz <mr-tz@users.noreply.github.com>
@mr-tz mr-tz closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers gsoc Work related to Google Summer of Code project.
Projects
None yet
Development

No branches or pull requests

3 participants