[Python-Dev] Reintroduce or drop completly hex, bz2, rot13, ... codecs
fuzzyman at voidspace.org.uk
Wed Jun 9 13:38:45 CEST 2010
On 09/06/2010 12:35, Antoine Pitrou wrote:
> 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'.untranform("hex")
> 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.
But in both cases you probably want bytes -> bytes and str -> str. If
you want text out then put text in, if you want bytes out then put bytes in.
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.
More information about the Python-Dev