On 10.06.10 21:31, Terry Reedy wrote:
> On 6/10/2010 7:08 AM, M.-A. Lemburg wrote:
>> Walter Dörwald wrote:
>
>>>> The PEP would also serve as a reference back to both this discussion and
>>>> the previous one (which was long enough ago that I've forgotten most of
>>>> it).
>>>
>>> I too think that a PEP is required here.
>>
>> Fair enough. I'll write a PEP.
>
> Thank you from me.
>>
>>> Codecs support several types of error handling that don't make sense for
>>> transform()/untransform(). What should 'abc'.decode('hex', 'replace')
>>> do? (In 2.6 it raises an assertion error, because errors *must* be strict).
>
> I would expext either ValueError: errors arg must be 'strict' for
> trransform
What use is an argument that must always have the same value?
'abc'.transform('hex', errors='strict', obey_the_flufl=True)
> or else TypeError: tranform takes 1 arg, 2 given.
IMHO that's the better option.
>> That's not really an issue since codecs don't have to implement
>> all error handling schemes.
>>
>> For starters, they will all only implement 'strict' mode.
I would prefer it if transformers were separate from codecs and had
their own registry.
Servus,
Walter
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com