[Python-3000] PEP 3138- String representation in Python 3000
Guido van Rossum
guido at python.org
Fri May 16 01:46:31 CEST 2008
On Thu, May 15, 2008 at 4:30 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> M.-A. Lemburg wrote:
>>
>> str.transform() -> str (uses the encode function of the codec)
>> str.untransform() -> str (uses the decode function of the codec)
>
> Not sure I like those names. It's rather unclear which
> direction is "transform" and which is "untransform".
>
> People seem to have trouble enough with "encode" and
> "decode", but at least there's a clear definition of
> that from Unicode-land, and there's the type difference
> to catch the mistake if you get it wrong.
>
> Since both ends have the same type here, it's more
> important to find unambiguous names if possible.
Really? Don't you think it's pretty obvious that b.transform("gzip")
compresses and b.untransform("gzip") decompresses? Or that
b.transform("base64") generates base64 format?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list