[Python-3000] Fix imghdr module for bytes

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Aug 13 02:08:28 CEST 2007


Paul Moore wrote:
> Ugh. Alternatively, h[0] == ord('P') should work.

I'm wondering whether we want a "byte character literal"
to go along with "byte string literals":

   h[0] == c"P"

After all, if it makes sense to write an array of bytes
as though they were ASCII characters, it must make sense
to write a single byte that way as well.

--
Greg


More information about the Python-3000 mailing list