Document the expected convention for getstate() (as explained to me by Guido).

This commit is contained in:
Ka-Ping Yee 2008-03-17 20:30:22 +00:00
parent ab0d8a1f59
commit e84b6336db
1 changed files with 3 additions and 1 deletions

View 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)