[Python-Dev] Reintroduce or drop completly hex, bz2, rot13, ... codecs
Antoine Pitrou
solipsis at pitrou.net
Wed Jun 9 13:35:49 CEST 2010
On Wed, 09 Jun 2010 10:41:29 +0200
"M.-A. Lemburg" <mal at egenix.com> wrote:
>
> The above example will read:
>
> >>> b'abc'.transform("hex")
> b'616263'
> >>> b'616263'.untranform("hex")
> b'abc'
This doesn't look right to me. Hex-encoded "data" is really text (it's
a textual representation of binary, and isn't often used as an opaque
binary transport encoding).
Of course, this is not necessarily so for all codecs. For
base64-encoded data, for example, it is debatable whether you want it
as ASCII bytes or unicode text.
More information about the Python-Dev
mailing list