[Python-ideas] Add an option for delimiters in bytes.hex()

Ethan Furman ethan at stoneleaf.us
Mon May 1 13:34:41 EDT 2017

On 05/01/2017 07:04 AM, Juancarlo Añez wrote:
> On Mon, May 1, 2017 at 9:38 AM, Nick Coghlan wrote:
>> just support two
>> keyword arguments to hex(): "delimiter" (as you suggest) and
>> "chunk_size" (defaulting to 1, so you get per-byte chunking by
>> default)
> I'd expect "chunk_size"  to mean the number of hex digits (not bytes) per chunk.

I was also surprised by that.  Also, should Python be used on a machine with, say, 24-bit words then a chunk size of 
three makes more sense that one of 1.5.  ;)


More information about the Python-ideas mailing list