From: Ka-Ping Yee Date: Mon, 17 Mar 2008 20:30:22 +0000 (+0000) Subject: Document the expected convention for getstate() (as explained to me by Guido). X-Git-Tag: v3.0a4~147 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e84b6336db4a2521de91aa916676bdf494aa8205;p=thirdparty%2FPython%2Fcpython.git Document the expected convention for getstate() (as explained to me by Guido). --- diff --git a/Lib/codecs.py b/Lib/codecs.py index 06cec17a7c31..6d8d5544edd6 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -259,7 +259,9 @@ class IncrementalDecoder(object): def getstate(self): """ Return the current state of the decoder. This must be a - (buffered_input, additional_state_info) tuple. + (buffered_input, additional_state_info) tuple. By convention, + additional_state_info should represent the state of the decoder + WITHOUT yet having processed the contents of buffered_input. """ return (b"", 0)