[Python-checkins] cpython (merge 3.3 -> default): Merge: Fix the return value of BZ2File._read_block() to be consistent with
nadeem.vawda
python-checkins at python.org
Sun Sep 30 13:45:43 CEST 2012
http://hg.python.org/cpython/rev/d79dc761f683
changeset: 79318:d79dc761f683
parent: 79316:37f4aa15a1c6
parent: 79317:1b4190d918c9
user: Nadeem Vawda <nadeem.vawda at gmail.com>
date: Sun Sep 30 13:45:22 2012 +0200
summary:
Merge: Fix the return value of BZ2File._read_block() to be consistent with comments.
files:
Lib/bz2.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/bz2.py b/Lib/bz2.py
--- a/Lib/bz2.py
+++ b/Lib/bz2.py
@@ -226,7 +226,7 @@
data = self._buffer[self._buffer_offset : end]
self._buffer_offset = end
self._pos += len(data)
- return data
+ return data if return_data else None
# The loop assumes that _buffer_offset is 0. Ensure that this is true.
self._buffer = self._buffer[self._buffer_offset:]
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list