[Python-Dev] transform() and untransform() methods, and the codec registry

Guido van Rossum guido at python.org
Fri Dec 3 19:05:32 CET 2010

On Fri, Dec 3, 2010 at 9:58 AM, R. David Murray <rdmurray at bitdance.com> wrote:
> On Fri, 03 Dec 2010 11:14:56 -0500, Alexander Belopolsky <alexander.belopolsky at gmail.com> wrote:
>> On Fri, Dec 3, 2010 at 10:11 AM, R. David Murray <rdmurray at bitdance.com> wrote:
>> ..
>> > Please also recall that transform/untransform was discussed before
>> > the release of Python 3.0 and was approved at the time, but it just
>> > did not get implemented before the 3.0 release.
>> >
>> Can you provide a link?  My search for transform on python-dev came out with
> It was linked from the issue, if I recall correctly.  I do remember
> reading the thread from the python-3000 list, linked by someone
> somewhere :)
>> http://mail.python.org/pipermail/python-dev/2010-June/100564.html
>> where you seem to oppose these methods.  Also, new methods to builtins
> It looks to me like I was agreeing that transform/untrasnform should
> do only bytes->bytes or str->str regardless of what codec name you
> passed them.
>> fall under the language moratorium (but can be approved on a
>> case-by-case basis):
>> http://www.python.org/dev/peps/pep-3003/#case-by-case-exemptions
>> Is there an effort to document these exceptions?  I expected such
>> approvals to be added to PEP 3003, but apparently this was not the
>> case.
> I believe MAL's thought was that the addition of these methods had
> been approved pre-moratorium, but I don't know if that is a
> sufficient argument or not.

It is not.

The moratorium is intended to freeze the state of the language as
implemented, not whatever was discussed and approved but didn't get
implemented (that'd be a hole big enough to drive a truck through, as
the saying goes :-).

Regardless of what I or others may have said before, I am not
currently a fan of adding transform() to either str or bytes.

--Guido van Rossum (python.org/~guido)

More information about the Python-Dev mailing list