There was an error while loading. Please reload this page.
1 parent 427c670 commit d03fda7Copy full SHA for d03fda7
1 file changed
Lib/codecs.py
@@ -321,13 +321,7 @@ def _buffer_decode(self, input, errors, final):
321
322
def decode(self, input, final=False):
323
# decode input (taking the buffer into account)
324
- data = b''
325
- if input is not None:
326
- data += input
327
-
328
- if self.buffer is not None:
329
- data += self.buffer
330
+ data = self.buffer + input
331
(result, consumed) = self._buffer_decode(data, self.errors, final)
332
# keep undecoded input until the next call
333
self.buffer = data[consumed:]
0 commit comments