[Python-3000] Unicode identifiers

Georg Brandl g.brandl at gmx.net
Tue Jun 12 22:28:21 CEST 2007

[crossposting to python-3000]

Martin v. Löwis schrieb:

[removing string->string codecs]

>>> You're not losing functionality -- these conversions will remain
>>> available by importing the appropriate module. You're losing a very
>>> minor amount of convenience.
>> Of the mentioned encodings base64, uu, zlib, rot_13, hex, and quopri (bz2
>> should be in there as well) these all could work in the unicode<->bytes
>> way, except for rot13.
> What does it mean to apply base64 to a string that contains characters
> with ordinals > 256? Likewise for uu, zlib, hex, and quopri.
> They really encode bytes, not characters.

Perhaps I may then suggest a new bytes API, transform().

b"abc".transform("base64") would then do the same as today's "abc".encode("base64").

A unified bytestring transforming API could then make many of the
functions scattered across many modules obsolete.

Whether the opposite way would be via a different transformer name
or a untransform() method remains to be debated.


More information about the Python-3000 mailing list