[New-bugs-announce] [issue20420] BufferedIncrementalEncoder violates IncrementalEncoder interface
Serhiy Storchaka
report at bugs.python.org
Tue Jan 28 17:34:45 CET 2014
New submission from Serhiy Storchaka:
The documentation of IncrementalEncoder.getstate() says:
"""
Return the current state of the encoder which must be an integer. The implementation should make sure that 0 is the most common state. (States that are more complicated than integers can be converted into an integer by marshaling/pickling the state and encoding the bytes of the resulting string into an integer).
"""
But implementation of BufferedIncrementalEncoder.getstate() is
def getstate(self):
return self.buffer or 0
self.buffer is "unencoded input that is kept between calls to encode()", e.g. a string.
----------
messages: 209563
nosy: doerwalter, lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: BufferedIncrementalEncoder violates IncrementalEncoder interface
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20420>
_______________________________________
More information about the New-bugs-announce
mailing list