[Python-checkins] python/dist/src/Modules _iconv_codec.c,NONE,1.1

Walter Dörwald walter@livinglogic.de
Thu, 30 Jan 2003 12:44:03 +0100


Hye-Shik Chang wrote:

> On Tue, Jan 28, 2003 at 12:30:33PM +0100, Walter D?rwald wrote:
> 
>>Martin v. L?wis wrote:
>> [...]
>>
>>>In any case, I'ld like to request that the documentation is clarified
>>>in this aspect (preferable, the "proper" documentation, not (just) the
>>>PEP). Once that clarification is added, the incorrect codecs should be
>>>corrected.
>>
>>So how should we handle these cases?
>>
>>a) Treat negative positions as relative to the end
> +1
> 
>>b) Treat negative positions as 0
> -1
> 
>>c) Clip out of bounds positions to the length of the input
> -0
> 
>>d) Raise an exception
> +0
> 
>>I'd vote for a) + d)
>>
>>If that's what we want to do I'll update the PEP, the documentation
>>and the implemenation.

OK, I've uploaded a patch that implements a) + d):
http://www.python.org/sf/677429

Bye,
    Walter Dörwald