<p dir="ltr">Using decode() and encode() would break that predictability. But someone suggested the use of transform() and untransform() instead. That would clarify that the transformation is bytes > bytes and Unicode string > Unicode string.</p>

<div class="gmail_quote">On 23 Apr 2013 05:50, "Lennart Regebro" <<a href="mailto:regebro@gmail.com">regebro@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Apr 23, 2013 at 4:04 AM, Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br>
> As others have pointed out in the past, repeatedly, the codec system is<br>
> completely general and can transform bytes->bytes and text->text just as<br>
> easily as bytes<->text.<br>
<br>
Yes, but the encode()/decode() methods are not, and the fact that you<br>
now know what goes in and what comes out means that people get much<br>
fewer Decode/EncodeErrors. Which is a good thing.<br>
<br>
//Lennart<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/fabiosantosart%40gmail.com" target="_blank">http://mail.python.org/mailman/options/python-dev/fabiosantosart%40gmail.com</a><br>
</blockquote></div>