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

M.-A. Lemburg mal at egenix.com
Mon Dec 6 12:39:43 CET 2010


Guido van Rossum wrote:
> 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, 

Indeed.

>> 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 :-).

Sure, but those two particular methods only provide interfaces
to the codecs sub-system without actually requiring any major
implementation changes.

Furthermore, they "help ease adoption of Python 3.x" (quoted from
PEP 3003), since the functionality they add back was removed from
Python 3.0 in a way that makes it difficult to port Python2
applications to Python3.

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

How should I read this ? Do want the methods to be removed again
and added back in 3.3 ?

Frankly, I'm a bit tired of constantly having to argue against
cutting down the Unicode and codec support in Python3.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 06 2010)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list