Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e84b633

Browse files
committed
Document the expected convention for getstate() (as explained to me by Guido).
1 parent ab0d8a1 commit e84b633

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/codecs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ def reset(self):
259259
def getstate(self):
260260
"""
261261
Return the current state of the decoder. This must be a
262-
(buffered_input, additional_state_info) tuple.
262+
(buffered_input, additional_state_info) tuple. By convention,
263+
additional_state_info should represent the state of the decoder
264+
WITHOUT yet having processed the contents of buffered_input.
263265
"""
264266
return (b"", 0)
265267

0 commit comments

Comments
 (0)