
Christopher Barker writes:
A byte is not a character
While I am -0.5 on bchr for many of the reasons already cited in the thread (and would be -1 if the methods names proposed for the feature were a bit more aesthetic), I don't think this argument is valid. Bytes that could otherwise be arbitrary (aka "magic numbers") are *often* chosen because they correspond to the ASCII repertoire. And strings is still a useful utility for C programmers, even if not so much for others. It's true that bytes are still bytes, characters are still characters, and it's a very good thing from my point of view that Python 3 gave us a consistent separation -- the only thing I ever explicitly use bytes for is passwords for zipfiles, and the implicit handling of bytes ontherwise just works for me :-). But it turns out it was a mistake to make it so hard for consenting adults to treat bytes as characters in certain contexts (for example, PEP 461 -- note: I opposed that PEP and I was wrong -- should have been part of Python 3.0). Steve