On Mon, Apr 22, 2013 at 7:04 PM, Steven D'Aprano <st...@pearwood.info> wrote: > As others have pointed out in the past, repeatedly, the codec system is > completely general and can transform bytes->bytes and text->text just as > easily as bytes<->text. Or indeed any bijection, as the docs for 2.7 point > out. The question isn't "What's so special about base64?" The questions > should be: > > - What's so special about exotic legacy transformations like ISO-8859-10 and > MacRoman that they deserve a string method for invoking them? > > - Why have common transformations like base64, which worked in 2.x, been > relegated to second-class status in 3.x? > > - If it is no burden to have to import a module and call an external > function for some transformations, why have encode and decode methods at > all?
There are good answers to all of these, and your rhetoric is not appreciated. The special status is for the translation between bytes and Unicode characters (code points). There are many contexts where a byte stream is labeled (either separately or in-line) as being encoded using some specific encoding. -- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com