Skip to content

bpo-22385: Support output separators in hex methods.#13578

Merged
gpshead merged 12 commits intopython:masterfrom
gpshead:bytes_hex_sep_impl
May 29, 2019
Merged

bpo-22385: Support output separators in hex methods.#13578
gpshead merged 12 commits intopython:masterfrom
gpshead:bytes_hex_sep_impl

Conversation

@gpshead
Copy link
Member

@gpshead gpshead commented May 26, 2019

Also in binascii.hexlify aka b2a_hex.

The underlying implementation behind all hex generation in CPython uses the
same pystrhex.c implementation. This adds support to bytes, bytearray,
and memoryview objects.

The binascii module functions exist rather than being slated for deprecation
because they return bytes rather than requiring an intermediate step through a
str object.

This change was inspired by MicroPython which supports sep in its binascii
implementation (and does not yet support the .hex methods).

https://bugs.python.org/issue22385

Also in binascii.hexlify aka b2a_hex.

The underlying implementation behind all hex generation in CPython uses the
same pystrhex.c implementation.  This adds support to bytes, bytearray,
and memoryview objects.

The binascii module functions exist rather than being slated for deprecation
because they return bytes rather than requiring an intermediate step through a
str object.

This change was inspired by MicroPython which supports sep in its binascii
implementation (and does not yet support the .hex methods).
@gpshead gpshead added the type-feature A feature request or enhancement label May 26, 2019
@gpshead gpshead requested review from ericvsmith and ncoghlan May 26, 2019 00:58
@gpshead gpshead self-assigned this May 26, 2019
@gpshead
Copy link
Member Author

gpshead commented May 29, 2019

and now my branch is messed up. WTF git.

gpshead added 6 commits May 28, 2019 17:30
Also in binascii.hexlify aka b2a_hex.

The underlying implementation behind all hex generation in CPython uses the
same pystrhex.c implementation.  This adds support to bytes, bytearray,
and memoryview objects.

The binascii module functions exist rather than being slated for deprecation
because they return bytes rather than requiring an intermediate step through a
str object.

This change was inspired by MicroPython which supports sep in its binascii
implementation (and does not yet support the .hex methods).
@gpshead gpshead force-pushed the bytes_hex_sep_impl branch from de26ba3 to 2851d3e Compare May 29, 2019 00:34
@gpshead gpshead merged commit 0c2f930 into python:master May 29, 2019
@bedevere-bot
Copy link

@gpshead: Please replace # with GH- in the commit message next time. Thanks!

@gpshead gpshead deleted the bytes_hex_sep_impl branch May 29, 2019 18:47
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
* bpo-22385: Support output separators in hex methods.

Also in binascii.hexlify aka b2a_hex.

The underlying implementation behind all hex generation in CPython uses the
same pystrhex.c implementation.  This adds support to bytes, bytearray,
and memoryview objects.

The binascii module functions exist rather than being slated for deprecation
because they return bytes rather than requiring an intermediate step through a
str object.

This change was inspired by MicroPython which supports sep in its binascii
implementation (and does not yet support the .hex methods).

https://bugs.python.org/issue22385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants