]> granicus.if.org Git - python/commitdiff
Document the expected convention for getstate() (as explained to me by Guido).
authorKa-Ping Yee <ping@zesty.ca>
Mon, 17 Mar 2008 20:30:22 +0000 (20:30 +0000)
committerKa-Ping Yee <ping@zesty.ca>
Mon, 17 Mar 2008 20:30:22 +0000 (20:30 +0000)
Lib/codecs.py

index 06cec17a7c316b0178c7bcdd80f3ede8a05e972b..6d8d5544edd65001dc9dbb4ec0a249644f5dc561 100644 (file)
@@ -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)