Walter Dörwald <wal...@livinglogic.de> added the comment: >> I'm not sure what the functions should do when start and end are >> out of range. > > I think the best approach would be to prevent these values to be out of > range in the first place.
The start and end values should be clipped, just like normal slices in Python do: >>> ""[2**30:2**30+1] '' > I agree there's not much value in making the attributes read/write, > but it looks like all of the exceptions allow it, so I don't really > want to make these exceptions the only ones that are different. Exception attributes *must* be read/write, because the codecs create an exception object once, and then uses this exception object to communicate multiple errors to the callback. PEP 293 states: "Should further encoding errors occur, the encoder is allowed to reuse the exception object for the next call to the callback." ---------- nosy: +doerwalter _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7309> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com