[issue22385] Define a binary output formatting mini-language for *.hex()

Gregory P. Smith report at bugs.python.org
Mon May 1 12:27:11 EDT 2017


Gregory P. Smith added the comment:

Based on the ideas thread it isn't obvious that chunk size means "per byte".  I suggest either specifying the number of base digits per delimiter.  Or using a name other than chunk that indicates it means bytes.

If we're going to do this, it should also be done for octal formatting (the 'o' code) for consistency.

Also, per the python-ideas thread, via parameters to the .hex() method on bytes/bytearray/memoryview.

I'm inclined to leave 'A' printable-ascii formatting out.  Or at least consider that it could also work on unicode str.

----------
nosy: +gregory.p.smith
versions: +Python 3.7 -Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22385>
_______________________________________


More information about the Python-bugs-list mailing list