commit | 2e0419dcd69cab245d30b92a7f442fd4617ca8f8 | [log] [tgz] |
---|---|---|
author | Alexandre Vassalotti <alexandre@peadrop.com> | Wed May 07 00:09:04 2008 +0000 |
committer | Alexandre Vassalotti <alexandre@peadrop.com> | Wed May 07 00:09:04 2008 +0000 |
tree | 3235d58d48fd8f5330043242eeb1598863eb09ef | |
parent | 8e99760c90c33fbfa1fbf8370df4b8503322e9b8 [diff] [blame] |
Cleaned how _BytesIO.read() returns an empty bytes object. Thank you, Guido, for noticing!
diff --git a/Lib/io.py b/Lib/io.py index a88b5a4..940c4c7 100644 --- a/Lib/io.py +++ b/Lib/io.py
@@ -794,7 +794,7 @@ 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