diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-07 00:09:04 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-07 00:09:04 (GMT) |
commit | 2e0419dcd69cab245d30b92a7f442fd4617ca8f8 (patch) | |
tree | 3235d58d48fd8f5330043242eeb1598863eb09ef /Lib/io.py | |
parent | 8e99760c90c33fbfa1fbf8370df4b8503322e9b8 (diff) | |
download | cpython-2e0419dcd69cab245d30b92a7f442fd4617ca8f8.zip cpython-2e0419dcd69cab245d30b92a7f442fd4617ca8f8.tar.gz cpython-2e0419dcd69cab245d30b92a7f442fd4617ca8f8.tar.bz2 |
Cleaned how _BytesIO.read() returns an empty bytes object.
Thank you, Guido, for noticing!
Diffstat (limited to 'Lib/io.py')
-rw-r--r-- | Lib/io.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -794,7 +794,7 @@ class _BytesIO(BufferedIOBase): if n < 0: n = len(self._buffer) if len(self._buffer) <= self._pos: - return bytes(self._buffer[:0]) + return b"" newpos = min(len(self._buffer), self._pos + n) b = self._buffer[self._pos : newpos] self._pos = newpos |