![](https://secure.gravatar.com/avatar/72ee673975357d43d79069ac1cd6abda.jpg?s=120&d=mm&r=g)
July 27, 2010
7:45 a.m.
anatoly techtonik wrote:
I wonder if it is possible to introduce an effective binary string type that will be represented as h"XX XX XX" in language syntax?
Rather than a new type, maybe bytes objects could just have a bit indicating whether they were best thought of as containing characterish stuff or just raw data. It wouldn't affect the behaviour in any way except that the repr would come out in hex instead of text. Then b"..." and h"..." literals could produce bytes objects with different settings for the raw-data bit. -- Greg