[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

Marc-Andre Lemburg report at bugs.python.org
Fri Dec 3 09:46:30 CET 2010


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Alexander Belopolsky wrote:
> 
> Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
> 
> I am probably a bit late to this discussion, but why these things should be called "codecs" and why should they share the registry with the encodings?  It looks like the proper term would be "transformations" or "transforms".

.transform() is just the name of the method. The codecs are still just
that: codecs, i.e. objects that encode and decode data. The types they
support are defined by the codecs, not by the helper methods.

In Python3, the str and bytes methods .encode() and .decode() will
only support str->bytes->str conversions. The new
str and bytes .transform() method adds back str->str and
bytes->bytes.

The codec subsystem does not impose restrictions on the type combinations
a codec can support, and that's per design.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7475>
_______________________________________


More information about the Python-bugs-list mailing list