[issue12508] Codecs Anomaly

Ezio Melotti report at bugs.python.org
Wed Sep 21 14:23:35 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

AFAIU final means:
  * final=0: I'm passing in a few bytes, but there are more to come, so if the last byte(s) doesn't make sense on its own (e.g. it's a start byte but the continuation bytes are missing), wait for the others before raising an error;
  * final=1: these are the last bytes, so if the last byte(s) doesn't make sense raise an error (or ignore/replace) because there won't be other bytes that might turn that in a well-formed byte sequence.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12508>
_______________________________________


More information about the Python-bugs-list mailing list