> Note that the more common idiom (not that I can measure it, mind)
> when dealing with byte strings is something analogous to
>
> if my_byte_string[i:i+1] == b'x':
>
> rather than
>
> if my_byte_string[i] == 170:
FWIW, Another spelling of this is
if my_byte_string[i] == ord(b'x')
>From a readability point, it's in the same category as the first one,
but less twisted.
Regards,
Martin
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com