On Mon, 11 May 2015 03:00 am, Terry Reedy wrote: > Decoding a string only makes sense for rot-13
Or any other string-to-string encoding. As has been discussed on python-ideas and python-dev many times, the idea of a codec is much more general than just bytes -> string and string -> bytes. It can deal with any transformation of data. The codec machinery can, I believe, operate on any suitable type, and it can certainly operate on bytes -> bytes and str -> str. I have gradually come to agree that bytes and str objects should only support decode() and encode() operations respectively, but str->str and bytes->bytes codecs are useful to. -- Steven -- https://mail.python.org/mailman/listinfo/python-list