[Python-Dev] Readability of hex strings (Was: Use of coding cookie in 3.x stdlib) (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jul 27 09:45:25 CEST 2010
- Previous message: [Python-Dev] Readability of hex strings (Was: Use of coding cookie in 3.x stdlib)
- Next message: [Python-Dev] Define a place for code review in Python workflow
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Readability of hex strings (Was: Use of coding cookie in 3.x stdlib)
- Next message: [Python-Dev] Define a place for code review in Python workflow
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]