aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKa-Ping Yee <ping@zesty.ca>2008-03-17 20:30:22 +0000
committerKa-Ping Yee <ping@zesty.ca>2008-03-17 20:30:22 +0000
commite84b6336db4a2521de91aa916676bdf494aa8205 (patch)
tree15b6cf868da626cd63b742662861c1b218843f9d /Lib/codecs.py
parentzlib.crc32 and zlib.adler32 now return an unsigned value as any sane person (diff)
downloadcpython-e84b6336db4a2521de91aa916676bdf494aa8205.tar.gz
cpython-e84b6336db4a2521de91aa916676bdf494aa8205.tar.bz2
cpython-e84b6336db4a2521de91aa916676bdf494aa8205.zip
Document the expected convention for getstate() (as explained to me by Guido).
Diffstat (limited to 'Lib/codecs.py')
-rw-r--r--Lib/codecs.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py
index 06cec17a7c3..6d8d5544edd 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)