Benjamin Peterson writes:
I agree. This is a very important, much-requested feature for low-level networking code.
I hear it's much-requested, but is there any description of typical use cases? The ones I've seen on this list and on -ideas are typically stream-oriented, and seem like they would be perfectly well-served in terms of code readability and algorithmic accuracy by reading with .decode('ascii', errors='surrogateescape') and writing with .encode() and the same parameters (or as latin1).
Yes, I don't think we need to support very much of the formatting language cover 99.8% of formating cases for bytes.
And the other 0.02% will be continuous excuses for RFEs and gratuitous bugs in rarely used format specs and ports from str processing to bytes processing.