]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Change the treatment of positions returned by PEP293
authorWalter Dörwald <walter@livinglogic.de>
Fri, 31 Jan 2003 17:19:08 +0000 (17:19 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Fri, 31 Jan 2003 17:19:08 +0000 (17:19 +0000)
commit2e0b18af3092a24c9689f72af898083ebfd9aec7
tree5dd08384e3560210deb41201ae3d7835899b44cd
parentf7f4517faeec7a37f5ad545092252a55e0450e10
Change the treatment of positions returned by PEP293
error handers in the Unicode codecs: Negative
positions are treated as being relative to the end of
the input and out of bounds positions result in an
IndexError.

Also update the PEP and include an explanation of
this in the documentation for codecs.register_error.

Fixes a small bug in iconv_codecs: if the position
from the callback is negative *add* it to the size
instead of substracting it.

From SF patch #677429.
Doc/lib/libcodecs.tex
Doc/lib/libfuncs.tex
Lib/test/test_codeccallbacks.py
Modules/_iconv_codec.c
Objects/unicodeobject.c